From b76a5e0d21b027c20a60faed5cd32f8c601dcc0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Augusto?= Date: Thu, 1 Feb 2024 17:35:43 +0000 Subject: [PATCH] refactor(plugin-odap-hermes): rename package, variables ODAP -> SATP MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * renamed every variable from odap to satp * left out CHANGELOG files Signed-off-by: André Augusto --- .cspell.json | 2 + .github/workflows/ci.yaml | 4 +- .../ghpkg-all-kotlin-api-clients-publish.yaml | 10 +- .../package.json | 2 +- .../src/main/typescript/cbdc-bridging-app.ts | 16 +- .../cbdc-bridging-app-dummy-infrastructure.ts | 22 +- .../besu-satp-gateway.ts} | 48 ++--- .../client-helper.ts | 38 ++-- .../fabric-satp-gateway.ts} | 48 ++--- .../server-helper.ts | 32 +-- .../cucumber/steps/bridge-back.steps.ts | 4 +- .../cucumber/steps/bridge-out.steps.ts | 4 +- .../tsconfig.json | 2 +- .../src/api-calls/besu-api.tsx | 2 +- .../src/api-calls/fabric-api.tsx | 2 +- .../tsconfig.json | 2 +- .../plugin-factory-besu-odap-gateway.ts | 20 -- .../plugin-factory-fabric-odap-gateway.ts | 20 -- .../src/main/typescript/public-api.ts | 27 --- .../CHANGELOG.md | 0 .../README.md | 12 +- .../knex/knexfile.ts | 0 .../20220331132128_create_logs_table.js | 0 .../openapitools.json | 0 .../package.json | 2 +- .../src/main/json/openapi.json | 76 +++---- .../kotlin-client/.openapi-generator/FILES | 2 +- .../kotlin-client/.openapi-generator/VERSION | 0 .../generated/openapi/kotlin-client/README.md | 38 ++-- .../openapi/kotlin-client/build.gradle | 0 .../generated/openapi/kotlin-client/gradlew | 0 .../openapi/kotlin-client/gradlew.bat | 0 .../openapi/kotlin-client/settings.gradle | 0 .../openapitools/client/apis/DefaultApi.kt | 36 ++-- .../client/infrastructure/ApiAbstractions.kt | 0 .../client/infrastructure/ApiClient.kt | 0 .../client/infrastructure/ApiResponse.kt | 0 .../infrastructure/BigDecimalAdapter.kt | 0 .../infrastructure/BigIntegerAdapter.kt | 0 .../client/infrastructure/ByteArrayAdapter.kt | 0 .../client/infrastructure/Errors.kt | 0 .../client/infrastructure/LocalDateAdapter.kt | 0 .../infrastructure/LocalDateTimeAdapter.kt | 0 .../infrastructure/OffsetDateTimeAdapter.kt | 0 .../client/infrastructure/PartConfig.kt | 0 .../client/infrastructure/RequestConfig.kt | 0 .../client/infrastructure/RequestMethod.kt | 0 .../infrastructure/ResponseExtensions.kt | 0 .../client/infrastructure/Serializer.kt | 0 .../client/infrastructure/URIAdapter.kt | 0 .../client/infrastructure/UUIDAdapter.kt | 0 .../client/models/AssetProfile.kt | 0 .../client/models/ClientV1Request.kt | 0 ...ientV1RequestClientGatewayConfiguration.kt | 0 .../client/models/CommitFinalV1Request.kt | 0 .../client/models/CommitFinalV1Response.kt | 0 .../models/CommitPreparationV1Request.kt | 0 .../models/CommitPreparationV1Response.kt | 0 .../client/models/CredentialProfile.kt | 0 .../org/openapitools/client/models/History.kt | 0 .../openapitools/client/models/LocalLog.kt} | 2 +- .../client/models/LockEvidenceV1Request.kt | 0 .../client/models/LockEvidenceV1Response.kt | 0 .../openapitools/client/models/OdapMessage.kt | 0 .../models/OdapMessageActionResponse.kt | 0 .../client/models/PayloadProfile.kt | 0 .../client/models/RecoverSuccessV1Message.kt | 0 .../models/RecoverUpdateAckV1Message.kt | 0 .../client/models/RecoverUpdateV1Message.kt | 4 +- .../client/models/RecoverV1Message.kt | 0 .../client/models/RollbackAckV1Message.kt | 0 .../client/models/RollbackV1Message.kt | 0 .../openapitools/client/models/SessionData.kt | 0 .../models/TransferCommenceV1Request.kt | 0 .../models/TransferCommenceV1Response.kt | 0 .../models/TransferCompleteV1Request.kt | 0 .../models/TransferInitializationV1Request.kt | 0 .../TransferInitializationV1Response.kt | 0 .../typescript/gateway/besu-satp-gateway.ts} | 36 ++-- .../gateway/client/client-helper.ts | 166 +++++++-------- .../gateway/fabric-satp-gateway.ts} | 36 ++-- .../plugin-factory-besu-satp-gateway.ts | 20 ++ .../plugin-factory-fabric-satp-gateway.ts | 20 ++ .../gateway/plugin-satp-gateway.ts} | 120 +++++------ .../gateway/recovery/recover-success.ts | 28 +-- .../gateway/recovery/recover-update-ack.ts | 28 +-- .../gateway/recovery/recover-update.ts | 44 ++-- .../typescript/gateway/recovery/recover.ts | 30 +-- .../gateway/recovery/rollback-ack.ts | 28 +-- .../typescript/gateway/recovery/rollback.ts | 28 +-- .../gateway/server/server-helper.ts | 198 +++++++++--------- .../typescript-axios/.openapi-generator/FILES | 0 .../.openapi-generator/VERSION | 0 .../generated/openapi/typescript-axios/api.ts | 126 +++++------ .../openapi/typescript-axios/base.ts | 0 .../openapi/typescript-axios/common.ts | 0 .../openapi/typescript-axios/configuration.ts | 0 .../openapi/typescript-axios/index.ts | 0 .../src/main/typescript/index.ts | 0 .../src/main/typescript/index.web.ts | 0 .../src/main/typescript/public-api.ts | 27 +++ .../client-side/client-request-endpoint.ts | 10 +- .../commit-final-response-endpoint.ts | 10 +- .../commit-prepare-response-endpoint.ts | 10 +- .../lock-evidence-response-endpoint.ts | 10 +- .../transfer-commence-response-endpoint.ts | 10 +- .../transfer-initiation-response-endpoint.ts | 10 +- .../recovery/recover-message-endpoint.ts | 10 +- .../recover-success-message-endpoint.ts | 10 +- .../recover-update-ack-message-endpoint.ts | 10 +- .../recover-update-message-endpoint.ts | 10 +- .../recovery/rollback-ack-message-endpoint.ts | 10 +- .../recovery/rollback-message-endpoint.ts | 10 +- .../commit-final-request-endpoint.ts | 10 +- .../commite-prepare-request-endpoint.ts | 10 +- .../lock-evidence-request-endpoint.ts | 10 +- .../transfer-commence-request-endpoint.ts | 10 +- .../transfer-complete-request-endpoint.ts | 10 +- .../transfer-initiation-request-endpoint.ts | 10 +- .../lock-asset-contract/LockAsset.json | 6 +- .../lock-asset-contract/lock-asset.sol | 0 .../chaincode-typescript/.gitignore | 0 .../chaincode-typescript/package.json | 0 .../chaincode-typescript/src/asset.ts | 0 .../chaincode-typescript/src/assetTransfer.ts | 0 .../chaincode-typescript/src/index.ts | 0 .../chaincode-typescript/tsconfig.json | 0 .../backup-gateway-after-client-crash.test.ts | 62 +++--- .../client-crash-after-delete-asset.test.ts | 54 ++--- .../client-crash-after-lock-asset.test.ts | 54 ++--- ...nt-crash-after-transfer-initiation.test.ts | 52 ++--- ...dap-api-call-with-ledger-connector.test.ts | 50 ++--- .../integration/odap-api-call.test.ts | 42 ++-- .../integration/odap-rollback.test.ts | 52 ++--- .../test/typescript/integration/odap.test.ts | 22 +- .../server-crash-after-create-asset.test.ts | 52 ++--- ...er-crash-after-transfer-initiation.test.ts | 54 ++--- .../src/test/typescript/knex.config.ts | 8 +- .../src/test/typescript/make-checks.ts | 52 ++--- .../unit/client/commit-final.test.ts | 28 +-- .../unit/client/commit-preparation.test.ts | 26 +-- .../unit/client/lock-evidence.test.ts | 26 +-- .../unit/client/transfer-commence.test.ts | 26 +-- .../client/transfer-initialization.test.ts | 26 +-- .../typescript/unit/recovery/logging.test.ts | 76 +++---- .../unit/recovery/recover-success.test.ts | 22 +- .../unit/recovery/recover-update-ack.test.ts | 22 +- .../unit/recovery/recover-update.test.ts | 40 ++-- .../typescript/unit/recovery/recover.test.ts | 32 +-- .../unit/server/commit-final.test.ts | 36 ++-- .../unit/server/commit-preparation.test.ts | 34 +-- .../unit/server/lock-evidence.test.ts | 38 ++-- .../unit/server/transfer-commence.test.ts | 38 ++-- .../unit/server/transfer-complete.test.ts | 28 +-- .../server/transfer-initialization.test.ts | 26 +-- .../tsconfig.json | 2 +- tsconfig.json | 2 +- yarn.lock | 78 +++---- 158 files changed, 1380 insertions(+), 1378 deletions(-) rename examples/cactus-example-cbdc-bridging-backend/src/main/typescript/{odap-extension/besu-odap-gateway.ts => satp-extension/besu-satp-gateway.ts} (95%) rename examples/cactus-example-cbdc-bridging-backend/src/main/typescript/{odap-extension => satp-extension}/client-helper.ts (83%) rename examples/cactus-example-cbdc-bridging-backend/src/main/typescript/{odap-extension/fabric-odap-gateway.ts => satp-extension/fabric-satp-gateway.ts} (95%) rename examples/cactus-example-cbdc-bridging-backend/src/main/typescript/{odap-extension => satp-extension}/server-helper.ts (85%) delete mode 100644 packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/plugin-factory-besu-odap-gateway.ts delete mode 100644 packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/plugin-factory-fabric-odap-gateway.ts delete mode 100644 packages/cactus-plugin-odap-hermes/src/main/typescript/public-api.ts rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/CHANGELOG.md (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/README.md (96%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/knex/knexfile.ts (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/knex/migrations/20220331132128_create_logs_table.js (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/openapitools.json (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/package.json (98%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/json/openapi.json (94%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES (98%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/README.md (84%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/build.gradle (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/gradlew (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt (98%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/AssetProfile.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClientV1Request.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClientV1RequestClientGatewayConfiguration.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitFinalV1Request.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitFinalV1Response.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitPreparationV1Request.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitPreparationV1Response.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CredentialProfile.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/History.kt (100%) rename packages/{cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/OdapLocalLog.kt => cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LocalLog.kt} (97%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LockEvidenceV1Request.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LockEvidenceV1Response.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/OdapMessage.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/OdapMessageActionResponse.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/PayloadProfile.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverSuccessV1Message.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverUpdateAckV1Message.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverUpdateV1Message.kt (85%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverV1Message.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RollbackAckV1Message.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RollbackV1Message.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SessionData.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCommenceV1Request.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCommenceV1Response.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCompleteV1Request.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferInitializationV1Request.kt (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferInitializationV1Response.kt (100%) rename packages/{cactus-plugin-odap-hermes/src/main/typescript/gateway/besu-odap-gateway.ts => cactus-plugin-satp-hermes/src/main/typescript/gateway/besu-satp-gateway.ts} (95%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/gateway/client/client-helper.ts (84%) rename packages/{cactus-plugin-odap-hermes/src/main/typescript/gateway/fabric-odap-gateway.ts => cactus-plugin-satp-hermes/src/main/typescript/gateway/fabric-satp-gateway.ts} (95%) create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-factory-besu-satp-gateway.ts create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-factory-fabric-satp-gateway.ts rename packages/{cactus-plugin-odap-hermes/src/main/typescript/gateway/plugin-odap-gateway.ts => cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-satp-gateway.ts} (92%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/gateway/recovery/recover-success.ts (74%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/gateway/recovery/recover-update-ack.ts (75%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/gateway/recovery/recover-update.ts (75%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/gateway/recovery/recover.ts (82%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/gateway/recovery/rollback-ack.ts (74%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/gateway/recovery/rollback.ts (75%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/gateway/server/server-helper.ts (83%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/generated/openapi/typescript-axios/api.ts (98%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/generated/openapi/typescript-axios/base.ts (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/generated/openapi/typescript-axios/common.ts (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/generated/openapi/typescript-axios/configuration.ts (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/generated/openapi/typescript-axios/index.ts (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/index.ts (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/index.web.ts (100%) create mode 100644 packages/cactus-plugin-satp-hermes/src/main/typescript/public-api.ts rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/web-services/client-side/client-request-endpoint.ts (89%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/web-services/client-side/commit-final-response-endpoint.ts (90%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/web-services/client-side/commit-prepare-response-endpoint.ts (90%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/web-services/client-side/lock-evidence-response-endpoint.ts (90%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/web-services/client-side/transfer-commence-response-endpoint.ts (90%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/web-services/client-side/transfer-initiation-response-endpoint.ts (90%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/web-services/recovery/recover-message-endpoint.ts (90%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/web-services/recovery/recover-success-message-endpoint.ts (90%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/web-services/recovery/recover-update-ack-message-endpoint.ts (90%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/web-services/recovery/recover-update-message-endpoint.ts (90%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/web-services/recovery/rollback-ack-message-endpoint.ts (90%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/web-services/recovery/rollback-message-endpoint.ts (90%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/web-services/server-side/commit-final-request-endpoint.ts (90%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/web-services/server-side/commite-prepare-request-endpoint.ts (90%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/web-services/server-side/lock-evidence-request-endpoint.ts (90%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/web-services/server-side/transfer-commence-request-endpoint.ts (90%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/web-services/server-side/transfer-complete-request-endpoint.ts (90%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/main/typescript/web-services/server-side/transfer-initiation-request-endpoint.ts (90%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/solidity/lock-asset-contract/LockAsset.json (99%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/solidity/lock-asset-contract/lock-asset.sol (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/.gitignore (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/package.json (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/asset.ts (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/assetTransfer.ts (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/index.ts (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/tsconfig.json (100%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts (94%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/integration/client-crash-after-delete-asset.test.ts (95%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/integration/client-crash-after-lock-asset.test.ts (94%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts (86%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts (94%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/integration/odap-api-call.test.ts (84%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/integration/odap-rollback.test.ts (95%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/integration/odap.test.ts (92%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/integration/server-crash-after-create-asset.test.ts (95%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts (85%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/knex.config.ts (54%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/make-checks.ts (82%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/unit/client/commit-final.test.ts (91%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/unit/client/commit-preparation.test.ts (88%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/unit/client/lock-evidence.test.ts (88%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/unit/client/transfer-commence.test.ts (89%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/unit/client/transfer-initialization.test.ts (90%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/unit/recovery/logging.test.ts (85%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/unit/recovery/recover-success.test.ts (87%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/unit/recovery/recover-update-ack.test.ts (87%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/unit/recovery/recover-update.test.ts (87%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/unit/recovery/recover.test.ts (86%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/unit/server/commit-final.test.ts (90%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/unit/server/commit-preparation.test.ts (87%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/unit/server/lock-evidence.test.ts (91%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/unit/server/transfer-commence.test.ts (90%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/unit/server/transfer-complete.test.ts (80%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/src/test/typescript/unit/server/transfer-initialization.test.ts (91%) rename packages/{cactus-plugin-odap-hermes => cactus-plugin-satp-hermes}/tsconfig.json (93%) diff --git a/.cspell.json b/.cspell.json index 72162b8152..6992dfe681 100644 --- a/.cspell.json +++ b/.cspell.json @@ -138,6 +138,8 @@ "recoverupdateackmessage", "RUSTC", "Rwset", + "satp", + "Satp", "sbjpubkey", "Secp", "shrn", diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 5efae83d5c..0eb7698729 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -1691,11 +1691,11 @@ jobs: restore-keys: | ${{ runner.os }}-yarn-${{ hashFiles('./yarn.lock') }} - run: ./tools/ci.sh - # cactus-plugin-odap-hermes: + # cactus-plugin-satp-hermes: # continue-on-error: false # env: # FULL_BUILD_DISABLED: true - # JEST_TEST_PATTERN: packages/cactus-plugin-odap-hermes/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts + # JEST_TEST_PATTERN: packages/cactus-plugin-satp-hermes/src/test/typescript/(unit|integration|benchmark)/.*/*.test.ts # JEST_TEST_RUNNER_DISABLED: false # TAPE_TEST_RUNNER_DISABLED: true # needs: build-dev diff --git a/.github/workflows/ghpkg-all-kotlin-api-clients-publish.yaml b/.github/workflows/ghpkg-all-kotlin-api-clients-publish.yaml index bc89547012..7648b174d8 100644 --- a/.github/workflows/ghpkg-all-kotlin-api-clients-publish.yaml +++ b/.github/workflows/ghpkg-all-kotlin-api-clients-publish.yaml @@ -206,19 +206,19 @@ jobs: name: cactus-plugin-keychain-memory-wasm-kotlin-client-${{ env.GITVERSION }}.jar path: packages/cactus-plugin-keychain-memory-wasm/src/main/kotlin/generated/openapi/kotlin-client/build/libs/kotlin-client-1.0.0.jar - - name: build-cactus-plugin-odap-hermes-kotlin-client + - name: build-cactus-plugin-satp-hermes-kotlin-client run: | WDIR=`pwd` - cd ${WDIR}/packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client + cd ${WDIR}/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client chmod +x gradlew ./gradlew clean ./gradlew build - - name: publish-cactus-plugin-odap-hermes-kotlin-client + - name: publish-cactus-plugin-satp-hermes-kotlin-client uses: actions/upload-artifact@v3.0.0 with: - name: cactus-plugin-odap-hermes-kotlin-client-${{ env.GITVERSION }}.jar - path: packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/build/libs/kotlin-client-1.0.0.jar + name: cactus-plugin-satp-hermes-kotlin-client-${{ env.GITVERSION }}.jar + path: packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/build/libs/kotlin-client-1.0.0.jar - name: build-cactus-example-supply-chain-business-logic-plugin-kotlin-client run: | diff --git a/examples/cactus-example-cbdc-bridging-backend/package.json b/examples/cactus-example-cbdc-bridging-backend/package.json index 13343c8a87..3c022fea01 100644 --- a/examples/cactus-example-cbdc-bridging-backend/package.json +++ b/examples/cactus-example-cbdc-bridging-backend/package.json @@ -65,7 +65,7 @@ "@hyperledger/cactus-plugin-ledger-connector-fabric": "2.0.0-alpha.2", "@hyperledger/cactus-plugin-ledger-connector-xdai": "2.0.0-alpha.2", "@hyperledger/cactus-plugin-object-store-ipfs": "2.0.0-alpha.2", - "@hyperledger/cactus-plugin-odap-hermes": "2.0.0-alpha.2", + "@hyperledger/cactus-plugin-satp-hermes": "2.0.0-alpha.2", "@hyperledger/cactus-test-tooling": "2.0.0-alpha.2", "@openzeppelin/contracts": "4.9.3", "@openzeppelin/contracts-upgradeable": "4.9.3", 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 index 0773294b18..2e655a0f76 100644 --- 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 @@ -18,23 +18,23 @@ import { import { Configuration, DefaultApi as OdapApi, - IOdapPluginKeyPair, -} from "@hyperledger/cactus-plugin-odap-hermes"; + IKeyPair, +} 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 { DefaultApi as IpfsApi } from "@hyperledger/cactus-plugin-object-store-ipfs"; -import { FabricOdapGateway } from "./odap-extension/fabric-odap-gateway"; -import { BesuOdapGateway } from "./odap-extension/besu-odap-gateway"; +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; - clientGatewayKeyPair: IOdapPluginKeyPair; - serverGatewayKeyPair: IOdapPluginKeyPair; + clientGatewayKeyPair: IKeyPair; + serverGatewayKeyPair: IKeyPair; logLevel?: LogLevelDesc; apiServerOptions?: ICactusApiServerOptions; disableSignalHandlers?: true; @@ -236,6 +236,6 @@ export interface IStartInfo { readonly ipfsApiClient: IpfsApi; readonly besuApiClient: BesuApi; readonly fabricApiClient: FabricApi; - readonly fabricOdapGateway: FabricOdapGateway; - readonly besuOdapGateway: BesuOdapGateway; + readonly fabricOdapGateway: FabricSatpGateway; + readonly besuOdapGateway: BesuSatpGateway; } 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 index daed720723..de315545c9 100644 --- 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 @@ -38,9 +38,9 @@ import { PluginRegistry } from "@hyperledger/cactus-core"; import { PluginObjectStoreIpfs } from "@hyperledger/cactus-plugin-object-store-ipfs"; import AssetReferenceContractJson from "../../../solidity/asset-reference-contract/AssetReferenceContract.json"; import CBDCcontractJson from "../../../solidity/cbdc-erc-20/CBDCcontract.json"; -import { IOdapPluginKeyPair } from "@hyperledger/cactus-plugin-odap-hermes"; -import { FabricOdapGateway } from "../odap-extension/fabric-odap-gateway"; -import { BesuOdapGateway } from "../odap-extension/besu-odap-gateway"; +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"; @@ -303,12 +303,12 @@ export class CbdcBridgingAppDummyInfrastructure { public async createClientGateway( nodeApiHost: string, - keyPair: IOdapPluginKeyPair, + keyPair: IKeyPair, ipfsPath: string, - ): Promise { + ): Promise { this.log.info(`Creating Source Gateway...`); - const pluginSourceGateway = new FabricOdapGateway({ - name: "cactus-plugin-source#odapGateway", + const pluginSourceGateway = new FabricSatpGateway({ + name: "cactus-plugin-source#satpGateway", dltIDs: ["DLT2"], instanceId: uuidv4(), keyPair: keyPair, @@ -330,12 +330,12 @@ export class CbdcBridgingAppDummyInfrastructure { public async createServerGateway( nodeApiHost: string, - keyPair: IOdapPluginKeyPair, + keyPair: IKeyPair, ipfsPath: string, - ): Promise { + ): Promise { this.log.info(`Creating Recipient Gateway...`); - const pluginRecipientGateway = new BesuOdapGateway({ - name: "cactus-plugin-recipient#odapGateway", + const pluginRecipientGateway = new BesuSatpGateway({ + name: "cactus-plugin-recipient#satpGateway", dltIDs: ["DLT1"], instanceId: uuidv4(), keyPair: keyPair, diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/odap-extension/besu-odap-gateway.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/besu-satp-gateway.ts similarity index 95% rename from examples/cactus-example-cbdc-bridging-backend/src/main/typescript/odap-extension/besu-odap-gateway.ts rename to examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/besu-satp-gateway.ts index 22a6955ebe..30d11dac31 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/odap-extension/besu-odap-gateway.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/besu-satp-gateway.ts @@ -8,18 +8,18 @@ import { InvokeContractV1Request as BesuInvokeContractV1Request, } from "@hyperledger/cactus-plugin-ledger-connector-besu"; import { - IOdapPluginKeyPair, - PluginOdapGateway, -} from "@hyperledger/cactus-plugin-odap-hermes"; -import { SessionDataRollbackActionsPerformedEnum } from "@hyperledger/cactus-plugin-odap-hermes"; + IKeyPair, + PluginSatpGateway, +} from "@hyperledger/cactus-plugin-satp-hermes"; +import { SessionDataRollbackActionsPerformedEnum } from "@hyperledger/cactus-plugin-satp-hermes"; import { ClientHelper } from "./client-helper"; import { ServerHelper } from "./server-helper"; -export interface IBesuOdapGatewayConstructorOptions { +export interface IBesuSatpGatewayConstructorOptions { name: string; dltIDs: string[]; instanceId: string; - keyPair?: IOdapPluginKeyPair; + keyPair?: IKeyPair; backupGatewaysAllowed?: string[]; ipfsPath?: string; @@ -36,13 +36,13 @@ export interface IBesuOdapGatewayConstructorOptions { knexConfig?: Knex.Config; } -export class BesuOdapGateway extends PluginOdapGateway { +export class BesuSatpGateway extends PluginSatpGateway { public besuApi?: BesuApi; public besuContractName?: string; public besuWeb3SigningCredential?: Web3SigningCredential; public besuKeychainId?: string; - public constructor(options: IBesuOdapGatewayConstructorOptions) { + public constructor(options: IBesuSatpGatewayConstructorOptions) { super({ name: options.name, dltIDs: options.dltIDs, @@ -58,7 +58,7 @@ export class BesuOdapGateway extends PluginOdapGateway { } private defineBesuConnection( - options: IBesuOdapGatewayConstructorOptions, + options: IBesuSatpGatewayConstructorOptions, ): void { const fnTag = `${this.className}#defineBesuConnection()`; @@ -124,7 +124,7 @@ export class BesuOdapGateway extends PluginOdapGateway { let besuCreateAssetProof = ""; - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "exec", operation: "create-asset", @@ -175,14 +175,14 @@ export class BesuOdapGateway extends PluginOdapGateway { `${fnTag}, proof of the asset creation: ${besuCreateAssetProof}`, ); - await this.storeOdapProof({ + await this.storeProof({ sessionID: sessionID, type: "proof", operation: "create", data: besuCreateAssetProof, }); - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "done", operation: "create-asset", @@ -207,7 +207,7 @@ export class BesuOdapGateway extends PluginOdapGateway { let besuDeleteAssetProof = ""; - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "exec", operation: "delete-asset", @@ -254,14 +254,14 @@ export class BesuOdapGateway extends PluginOdapGateway { `${fnTag}, proof of the asset deletion: ${besuDeleteAssetProof}`, ); - await this.storeOdapProof({ + await this.storeProof({ sessionID: sessionID, type: "proof", operation: "delete", data: besuDeleteAssetProof, }); - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "done", operation: "delete-asset", @@ -286,7 +286,7 @@ export class BesuOdapGateway extends PluginOdapGateway { let besuLockAssetProof = ""; - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "exec", operation: "lock-asset", @@ -330,14 +330,14 @@ export class BesuOdapGateway extends PluginOdapGateway { this.log.info(`${fnTag}, proof of the asset lock: ${besuLockAssetProof}`); - await this.storeOdapProof({ + await this.storeProof({ sessionID: sessionID, type: "proof", operation: "lock", data: besuLockAssetProof, }); - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "done", operation: "lock-asset", @@ -362,7 +362,7 @@ export class BesuOdapGateway extends PluginOdapGateway { let besuUnlockAssetProof = ""; - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "exec-rollback", operation: "unlock-asset", @@ -412,14 +412,14 @@ export class BesuOdapGateway extends PluginOdapGateway { `${fnTag}, proof of the asset unlock: ${besuUnlockAssetProof}`, ); - await this.storeOdapProof({ + await this.storeProof({ sessionID: sessionID, type: "proof-rollback", operation: "unlock", data: besuUnlockAssetProof, }); - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "done-rollback", operation: "unlock-asset", @@ -450,7 +450,7 @@ export class BesuOdapGateway extends PluginOdapGateway { let besuCreateAssetProof = ""; - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "exec-rollback", operation: "create-asset", @@ -504,14 +504,14 @@ export class BesuOdapGateway extends PluginOdapGateway { `${fnTag}, proof of the asset create: ${besuCreateAssetProof}`, ); - await this.storeOdapProof({ + await this.storeProof({ sessionID: sessionID, type: "proof-rollback", operation: "create", data: besuCreateAssetProof, }); - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "done-rollback", operation: "create-asset", diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/odap-extension/client-helper.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/client-helper.ts similarity index 83% rename from examples/cactus-example-cbdc-bridging-backend/src/main/typescript/odap-extension/client-helper.ts rename to examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/client-helper.ts index 62430f33f2..eeca7772a5 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/odap-extension/client-helper.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/client-helper.ts @@ -1,22 +1,22 @@ import { SHA256 } from "crypto-js"; import { - PluginOdapGateway, + PluginSatpGateway, TransferInitializationV1Request, ClientGatewayHelper, -} from "@hyperledger/cactus-plugin-odap-hermes"; -import { OdapMessageType } from "@hyperledger/cactus-plugin-odap-hermes"; -import { FabricOdapGateway } from "./fabric-odap-gateway"; -import { BesuOdapGateway } from "./besu-odap-gateway"; +} from "@hyperledger/cactus-plugin-satp-hermes"; +import { OdapMessageType } 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, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, remote: boolean, ): Promise { const fnTag = `${this.className}#sendTransferInitializationRequest()`; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if ( sessionData == undefined || @@ -44,7 +44,7 @@ export class ClientHelper extends ClientGatewayHelper { throw new Error(`${fnTag}, session data is not correctly initialized`); } - if (!odap.supportedDltIDs.includes(sessionData.recipientGatewayDltSystem)) { + if (!gateway.supportedDltIDs.includes(sessionData.recipientGatewayDltSystem)) { throw new Error( `${fnTag}, recipient gateway dlt system is not supported by this gateway`, ); @@ -61,7 +61,7 @@ export class ClientHelper extends ClientGatewayHelper { loggingProfile: sessionData.loggingProfile, accessControlProfile: sessionData.accessControlProfile, signature: "", - sourceGatewayPubkey: odap.pubKey, + sourceGatewayPubkey: gateway.pubKey, sourceGatewayDltSystem: sessionData.sourceGatewayDltSystem, recipientGatewayPubkey: sessionData.recipientGatewayPubkey, recipientGatewayDltSystem: sessionData.recipientGatewayDltSystem, @@ -80,8 +80,8 @@ export class ClientHelper extends ClientGatewayHelper { sourceLedgerAssetID: sessionData.sourceLedgerAssetID, }; - const messageSignature = PluginOdapGateway.bufArray2HexStr( - odap.sign(JSON.stringify(initializationRequestMessage)), + const messageSignature = PluginSatpGateway.bufArray2HexStr( + gateway.sign(JSON.stringify(initializationRequestMessage)), ); initializationRequestMessage.signature = messageSignature; @@ -92,17 +92,17 @@ export class ClientHelper extends ClientGatewayHelper { sessionData.clientSignatureInitializationRequestMessage = messageSignature; - odap.sessions.set(sessionID, sessionData); + gateway.sessions.set(sessionID, sessionData); - await odap.storeOdapLog({ + await gateway.storeLog({ sessionID: sessionID, type: "init", operation: "validate", data: JSON.stringify(sessionData), }); - if (odap instanceof FabricOdapGateway) { - await odap + if (gateway instanceof FabricSatpGateway) { + await gateway .isValidBridgeOutCBDC( sessionData.sourceLedgerAssetID, sessionData.assetProfile.keyInformationLink[0].toString(), // Amount @@ -112,8 +112,8 @@ export class ClientHelper extends ClientGatewayHelper { .catch((err) => { throw new Error(`${err.response.data.error}`); }); - } else if (odap instanceof BesuOdapGateway) { - await odap + } else if (gateway instanceof BesuSatpGateway) { + await gateway .isValidBridgeBackCBDC( sessionData.sourceLedgerAssetID, sessionData.assetProfile.keyInformationLink[0].toString(), // Amount @@ -130,9 +130,9 @@ export class ClientHelper extends ClientGatewayHelper { return initializationRequestMessage; } - await odap.makeRequest( + await gateway.makeRequest( sessionID, - PluginOdapGateway.getOdapAPI( + PluginSatpGateway.getOdapAPI( sessionData.recipientBasePath, ).phase1TransferInitiationRequestV1(initializationRequestMessage), "TransferInitializationRequest", diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/odap-extension/fabric-odap-gateway.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/fabric-satp-gateway.ts similarity index 95% rename from examples/cactus-example-cbdc-bridging-backend/src/main/typescript/odap-extension/fabric-odap-gateway.ts rename to examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/fabric-satp-gateway.ts index 824b842a54..1f94afd71b 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/odap-extension/fabric-odap-gateway.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/fabric-satp-gateway.ts @@ -8,18 +8,18 @@ import { RunTransactionRequest as FabricRunTransactionRequest, } from "@hyperledger/cactus-plugin-ledger-connector-fabric"; import { - IOdapPluginKeyPair, - PluginOdapGateway, -} from "@hyperledger/cactus-plugin-odap-hermes"; -import { SessionDataRollbackActionsPerformedEnum } from "@hyperledger/cactus-plugin-odap-hermes"; + IKeyPair, + PluginSatpGateway, +} from "@hyperledger/cactus-plugin-satp-hermes"; +import { SessionDataRollbackActionsPerformedEnum } from "@hyperledger/cactus-plugin-satp-hermes"; import { ClientHelper } from "./client-helper"; import { ServerHelper } from "./server-helper"; -export interface IFabricOdapGatewayConstructorOptions { +export interface IFabricSatpGatewayConstructorOptions { name: string; dltIDs: string[]; instanceId: string; - keyPair?: IOdapPluginKeyPair; + keyPair?: IKeyPair; backupGatewaysAllowed?: string[]; ipfsPath?: string; @@ -32,13 +32,13 @@ export interface IFabricOdapGatewayConstructorOptions { knexConfig?: Knex.Config; } -export class FabricOdapGateway extends PluginOdapGateway { +export class FabricSatpGateway extends PluginSatpGateway { public fabricApi?: FabricApi; public fabricSigningCredential?: FabricSigningCredential; public fabricChannelName?: string; public fabricContractName?: string; - public constructor(options: IFabricOdapGatewayConstructorOptions) { + public constructor(options: IFabricSatpGatewayConstructorOptions) { super({ name: options.name, dltIDs: options.dltIDs, @@ -54,7 +54,7 @@ export class FabricOdapGateway extends PluginOdapGateway { } private defineFabricConnection( - options: IFabricOdapGatewayConstructorOptions, + options: IFabricSatpGatewayConstructorOptions, ): void { const fnTag = `${this.className}#defineFabricConnection()`; @@ -127,7 +127,7 @@ export class FabricOdapGateway extends PluginOdapGateway { assetId = sessionData.sourceLedgerAssetID; } - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "exec", operation: "lock-asset", @@ -165,14 +165,14 @@ export class FabricOdapGateway extends PluginOdapGateway { this.log.info(`${fnTag}, proof of the asset lock: ${fabricLockAssetProof}`); - await this.storeOdapProof({ + await this.storeProof({ sessionID: sessionID, type: "proof", operation: "lock", data: fabricLockAssetProof, }); - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "done", operation: "lock-asset", @@ -197,7 +197,7 @@ export class FabricOdapGateway extends PluginOdapGateway { let fabricUnlockAssetProof = ""; - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "exec-rollback", operation: "unlock-asset", @@ -238,14 +238,14 @@ export class FabricOdapGateway extends PluginOdapGateway { `${fnTag}, proof of the asset unlock: ${fabricUnlockAssetProof}`, ); - await this.storeOdapProof({ + await this.storeProof({ sessionID: sessionID, type: "proof-rollback", operation: "unlock", data: fabricUnlockAssetProof, }); - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "done-rollback", operation: "unlock-asset", @@ -275,7 +275,7 @@ export class FabricOdapGateway extends PluginOdapGateway { assetId = sessionData.recipientLedgerAssetID; } - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "exec", operation: "create-asset", @@ -320,14 +320,14 @@ export class FabricOdapGateway extends PluginOdapGateway { `${fnTag}, proof of the asset create: ${fabricCreateAssetProof}`, ); - await this.storeOdapProof({ + await this.storeProof({ sessionID: sessionID, type: "proof", operation: "create", data: fabricCreateAssetProof, }); - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "done", operation: "create-asset", @@ -352,7 +352,7 @@ export class FabricOdapGateway extends PluginOdapGateway { assetId = sessionData.sourceLedgerAssetID; } - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "exec", operation: "delete-asset", @@ -391,14 +391,14 @@ export class FabricOdapGateway extends PluginOdapGateway { `${fnTag}, proof of the asset deletion: ${fabricDeleteAssetProof}`, ); - await this.storeOdapProof({ + await this.storeProof({ sessionID: sessionID, type: "proof", operation: "delete", data: fabricDeleteAssetProof, }); - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "done", operation: "delete-asset", @@ -436,7 +436,7 @@ export class FabricOdapGateway extends PluginOdapGateway { assetID = sessionData.recipientLedgerAssetID; } - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "exec-rollback", operation: "create-asset", @@ -482,14 +482,14 @@ export class FabricOdapGateway extends PluginOdapGateway { `${fnTag}, proof of the asset creation: ${fabricCreateAssetProof}`, ); - await this.storeOdapProof({ + await this.storeProof({ sessionID: sessionID, type: "proof-rollback", operation: "create", data: fabricCreateAssetProof, }); - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "done-rollback", operation: "create-asset", diff --git a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/odap-extension/server-helper.ts b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/server-helper.ts similarity index 85% rename from examples/cactus-example-cbdc-bridging-backend/src/main/typescript/odap-extension/server-helper.ts rename to examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/server-helper.ts index 4f3ab1ad57..90ebbe81f8 100644 --- a/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/odap-extension/server-helper.ts +++ b/examples/cactus-example-cbdc-bridging-backend/src/main/typescript/satp-extension/server-helper.ts @@ -2,14 +2,14 @@ import { SHA256 } from "crypto-js"; import { SessionData, TransferInitializationV1Request, -} from "@hyperledger/cactus-plugin-odap-hermes"; +} from "@hyperledger/cactus-plugin-satp-hermes"; import { OdapMessageType, - PluginOdapGateway, -} from "@hyperledger/cactus-plugin-odap-hermes"; -import { ServerGatewayHelper } from "@hyperledger/cactus-plugin-odap-hermes"; + PluginSatpGateway, +} from "@hyperledger/cactus-plugin-satp-hermes"; +import { ServerGatewayHelper } from "@hyperledger/cactus-plugin-satp-hermes"; -import { FabricOdapGateway } from "./fabric-odap-gateway"; +import { FabricSatpGateway } from "./fabric-satp-gateway"; import { LogLevelDesc } from "@hyperledger/cactus-common"; export interface IServerHelperOptions { @@ -30,9 +30,9 @@ export class ServerHelper extends ServerGatewayHelper { async checkValidInitializationRequest( request: TransferInitializationV1Request, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, ): Promise { - const fnTag = `${odap.className}#checkValidInitializationRequest()`; + const fnTag = `${gateway.className}#checkValidInitializationRequest()`; const sessionData: SessionData = {}; const recvTimestamp: string = Date.now().toString(); @@ -42,9 +42,9 @@ export class ServerHelper extends ServerGatewayHelper { sessionData.step = 2; sessionData.initializationRequestMessageRcvTimeStamp = recvTimestamp; - odap.sessions.set(sessionID, sessionData); + gateway.sessions.set(sessionID, sessionData); - await odap.storeOdapLog({ + await gateway.storeLog({ sessionID: sessionID, type: "exec", operation: "validate", @@ -57,13 +57,13 @@ export class ServerHelper extends ServerGatewayHelper { ); } - if (!odap.verifySignature(request, request.sourceGatewayPubkey)) { + if (!gateway.verifySignature(request, request.sourceGatewayPubkey)) { throw new Error( `${fnTag}, TransferInitializationRequest message signature verification failed`, ); } - if (!odap.supportedDltIDs.includes(request.sourceGatewayDltSystem)) { + if (!gateway.supportedDltIDs.includes(request.sourceGatewayDltSystem)) { throw new Error( `${fnTag}, source gateway dlt system is not supported by this gateway`, ); @@ -93,7 +93,7 @@ export class ServerHelper extends ServerGatewayHelper { sessionData.maxTimeout = request.maxTimeout; sessionData.allowedSourceBackupGateways = request.backupGatewaysAllowed; - sessionData.allowedRecipientBackupGateways = odap.backupGatewaysAllowed; + sessionData.allowedRecipientBackupGateways = gateway.backupGatewaysAllowed; sessionData.sourceBasePath = request.sourceBasePath; sessionData.recipientBasePath = request.recipientBasePath; @@ -122,10 +122,10 @@ export class ServerHelper extends ServerGatewayHelper { sessionData.initializationRequestMessageProcessedTimeStamp = Date.now().toString(); - odap.sessions.set(request.sessionID, sessionData); + gateway.sessions.set(request.sessionID, sessionData); - if (odap instanceof FabricOdapGateway) { - await odap + if (gateway instanceof FabricSatpGateway) { + await gateway .isValidBridgeBackCBDC( request.payloadProfile.assetProfile.keyInformationLink[1].toString(), // FabricID request.payloadProfile.assetProfile.keyInformationLink[2].toString(), // ETH Address @@ -135,7 +135,7 @@ export class ServerHelper extends ServerGatewayHelper { }); } - await odap.storeOdapLog({ + await gateway.storeLog({ sessionID: sessionID, type: "done", operation: "validate", 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 index e4b253fd26..fd0a713e82 100644 --- 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 @@ -30,7 +30,7 @@ Then( }; const response = await axios.post( - "http://127.0.0.1:4100/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest", + "http://127.0.0.1:4100/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest", { clientGatewayConfiguration: { apiHost: `http://127.0.0.1:4100`, @@ -92,7 +92,7 @@ Then( await axios .post( - "http://127.0.0.1:4100/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest", + "http://127.0.0.1:4100/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest", { clientGatewayConfiguration: { apiHost: `http://127.0.0.1:4100`, 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 index 3ed80385af..ee3b907388 100644 --- 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 @@ -55,7 +55,7 @@ When( }; const response = await axios.post( - "http://127.0.0.1:4000/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest", + "http://127.0.0.1:4000/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest", { clientGatewayConfiguration: { apiHost: `http://127.0.0.1:4000`, @@ -118,7 +118,7 @@ Then( await axios .post( - "http://127.0.0.1:4000/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest", + "http://127.0.0.1:4000/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest", { clientGatewayConfiguration: { apiHost: `http://127.0.0.1:4000`, diff --git a/examples/cactus-example-cbdc-bridging-backend/tsconfig.json b/examples/cactus-example-cbdc-bridging-backend/tsconfig.json index ec3da0ce1e..3d723037bc 100644 --- a/examples/cactus-example-cbdc-bridging-backend/tsconfig.json +++ b/examples/cactus-example-cbdc-bridging-backend/tsconfig.json @@ -38,7 +38,7 @@ "path": "../../packages/cactus-plugin-ledger-connector-besu/tsconfig.json" }, { - "path": "../../packages/cactus-plugin-odap-hermes/tsconfig.json" + "path": "../../packages/cactus-plugin-satp-hermes/tsconfig.json" }, { "path": "../../packages/cactus-test-tooling/tsconfig.json" 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 index 04da2532ba..3aecf5ed30 100644 --- 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 @@ -99,7 +99,7 @@ export async function bridgeBackTokensBesu(frontendUser: string, amount: number, }; await axios.post( - "http://localhost:4100/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest", + "http://localhost:4100/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest", { clientGatewayConfiguration: { apiHost: `http://localhost:4100`, 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 index 30549e4b1f..9bb5fd2748 100644 --- 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 @@ -109,7 +109,7 @@ export async function bridgeOutTokensFabric(frontendUser: string, amount: string }; await axios.post( - "http://localhost:4000/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest", + "http://localhost:4000/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest", { clientGatewayConfiguration: { apiHost: `http://localhost:4000`, diff --git a/examples/cactus-example-cbdc-bridging-frontend/tsconfig.json b/examples/cactus-example-cbdc-bridging-frontend/tsconfig.json index e4d4ec8a2f..d27ab29e0b 100644 --- a/examples/cactus-example-cbdc-bridging-frontend/tsconfig.json +++ b/examples/cactus-example-cbdc-bridging-frontend/tsconfig.json @@ -34,7 +34,7 @@ "path": "../../packages/cactus-plugin-ledger-connector-fabric/tsconfig.json" }, { - "path": "../../packages/cactus-plugin-odap-hermes/tsconfig.json" + "path": "../../packages/cactus-plugin-satp-hermes/tsconfig.json" } ] } diff --git a/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/plugin-factory-besu-odap-gateway.ts b/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/plugin-factory-besu-odap-gateway.ts deleted file mode 100644 index 36f23f0126..0000000000 --- a/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/plugin-factory-besu-odap-gateway.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; -import { - IBesuOdapGatewayConstructorOptions, - BesuOdapGateway, -} from "./besu-odap-gateway"; - -export class PluginFactoryBesuOdapGateway extends PluginFactory< - BesuOdapGateway, - IBesuOdapGatewayConstructorOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IBesuOdapGatewayConstructorOptions, - ): Promise { - return new BesuOdapGateway(pluginOptions); - } -} diff --git a/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/plugin-factory-fabric-odap-gateway.ts b/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/plugin-factory-fabric-odap-gateway.ts deleted file mode 100644 index f94b75655e..0000000000 --- a/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/plugin-factory-fabric-odap-gateway.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { - IPluginFactoryOptions, - PluginFactory, -} from "@hyperledger/cactus-core-api"; -import { - IFabricOdapGatewayConstructorOptions, - FabricOdapGateway, -} from "./fabric-odap-gateway"; - -export class PluginFactoryFabricOdapGateway extends PluginFactory< - FabricOdapGateway, - IFabricOdapGatewayConstructorOptions, - IPluginFactoryOptions -> { - async create( - pluginOptions: IFabricOdapGatewayConstructorOptions, - ): Promise { - return new FabricOdapGateway(pluginOptions); - } -} diff --git a/packages/cactus-plugin-odap-hermes/src/main/typescript/public-api.ts b/packages/cactus-plugin-odap-hermes/src/main/typescript/public-api.ts deleted file mode 100644 index 5b74a9f312..0000000000 --- a/packages/cactus-plugin-odap-hermes/src/main/typescript/public-api.ts +++ /dev/null @@ -1,27 +0,0 @@ -export * from "./generated/openapi/typescript-axios/index"; - -export { - IPluginOdapGatewayConstructorOptions, - PluginOdapGateway, - OdapMessageType, - IOdapPluginKeyPair, -} from "./gateway/plugin-odap-gateway"; - -import { IPluginFactoryOptions } from "@hyperledger/cactus-core-api"; -import { PluginFactoryFabricOdapGateway } from "./gateway/plugin-factory-fabric-odap-gateway"; -import { PluginFactoryBesuOdapGateway } from "./gateway/plugin-factory-besu-odap-gateway"; - -export async function createFabricPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryFabricOdapGateway(pluginFactoryOptions); -} - -export async function createBesuPluginFactory( - pluginFactoryOptions: IPluginFactoryOptions, -): Promise { - return new PluginFactoryBesuOdapGateway(pluginFactoryOptions); -} - -export { ServerGatewayHelper } from "./gateway/server/server-helper"; -export { ClientGatewayHelper } from "./gateway/client/client-helper"; diff --git a/packages/cactus-plugin-odap-hermes/CHANGELOG.md b/packages/cactus-plugin-satp-hermes/CHANGELOG.md similarity index 100% rename from packages/cactus-plugin-odap-hermes/CHANGELOG.md rename to packages/cactus-plugin-satp-hermes/CHANGELOG.md diff --git a/packages/cactus-plugin-odap-hermes/README.md b/packages/cactus-plugin-satp-hermes/README.md similarity index 96% rename from packages/cactus-plugin-odap-hermes/README.md rename to packages/cactus-plugin-satp-hermes/README.md index 30ca2891ed..6ab940d3ce 100644 --- a/packages/cactus-plugin-odap-hermes/README.md +++ b/packages/cactus-plugin-satp-hermes/README.md @@ -1,4 +1,4 @@ -# @hyperledger/cactus-plugin-odap-hermes +# @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. @@ -117,7 +117,7 @@ Let us consider two gateways. The client gateway connected to Hyperledger Fabric Then the ODAP gateways should be created as follows: ```typescript -const clientGatewayOptions: IFabricOdapGatewayConstructorOptions = { +const clientGatewayOptions: IFabricSatpGatewayConstructorOptions = { name: "cactus-plugin#clientOdapGateway", dltIDs: ["DLT2"], instanceId: uuidv4(), @@ -130,7 +130,7 @@ const clientGatewayOptions: IFabricOdapGatewayConstructorOptions = { serverHelper: new ServerGatewayHelper(), }; -const serverGatewayOptions: IBesuOdapGatewayConstructorOptions = { +const serverGatewayOptions: IBesuSatpGatewayConstructorOptions = { name: "cactus-plugin#serverOdapGateway", dltIDs: ["DLT1"], instanceId: uuidv4(), @@ -143,11 +143,11 @@ const serverGatewayOptions: IBesuOdapGatewayConstructorOptions = { serverHelper: new ServerGatewayHelper(), }; - const clientGateway = new FabricOdapGateway(clientGatewayOptions); - const serverGateway = new BesuOdapGateway(serverGatewayOptions); + 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-odap-gateway.ts), that implements the gateway functionality. Each of these extensions implements ledger-specific operations. +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! diff --git a/packages/cactus-plugin-odap-hermes/knex/knexfile.ts b/packages/cactus-plugin-satp-hermes/knex/knexfile.ts similarity index 100% rename from packages/cactus-plugin-odap-hermes/knex/knexfile.ts rename to packages/cactus-plugin-satp-hermes/knex/knexfile.ts diff --git a/packages/cactus-plugin-odap-hermes/knex/migrations/20220331132128_create_logs_table.js b/packages/cactus-plugin-satp-hermes/knex/migrations/20220331132128_create_logs_table.js similarity index 100% rename from packages/cactus-plugin-odap-hermes/knex/migrations/20220331132128_create_logs_table.js rename to packages/cactus-plugin-satp-hermes/knex/migrations/20220331132128_create_logs_table.js diff --git a/packages/cactus-plugin-odap-hermes/openapitools.json b/packages/cactus-plugin-satp-hermes/openapitools.json similarity index 100% rename from packages/cactus-plugin-odap-hermes/openapitools.json rename to packages/cactus-plugin-satp-hermes/openapitools.json diff --git a/packages/cactus-plugin-odap-hermes/package.json b/packages/cactus-plugin-satp-hermes/package.json similarity index 98% rename from packages/cactus-plugin-odap-hermes/package.json rename to packages/cactus-plugin-satp-hermes/package.json index 643b35017c..e8df3e07a2 100644 --- a/packages/cactus-plugin-odap-hermes/package.json +++ b/packages/cactus-plugin-satp-hermes/package.json @@ -1,5 +1,5 @@ { - "name": "@hyperledger/cactus-plugin-odap-hermes", + "name": "@hyperledger/cactus-plugin-satp-hermes", "version": "2.0.0-alpha.2", "description": "Proof of concept of ODAP", "keywords": [ diff --git a/packages/cactus-plugin-odap-hermes/src/main/json/openapi.json b/packages/cactus-plugin-satp-hermes/src/main/json/openapi.json similarity index 94% rename from packages/cactus-plugin-odap-hermes/src/main/json/openapi.json rename to packages/cactus-plugin-satp-hermes/src/main/json/openapi.json index 65a461aaf9..e9494fc563 100644 --- a/packages/cactus-plugin-odap-hermes/src/main/json/openapi.json +++ b/packages/cactus-plugin-satp-hermes/src/main/json/openapi.json @@ -1109,7 +1109,7 @@ "recoveredLogs": { "type": "array", "items": { - "$ref": "#/components/schemas/OdapLocalLog" + "$ref": "#/components/schemas/LocalLog" } }, "signature": { @@ -1202,7 +1202,7 @@ }, "required": ["sessionID", "success", "signature"] }, - "OdapLocalLog": { + "LocalLog": { "type": "object", "properties": { "key": { @@ -1288,12 +1288,12 @@ } }, "paths": { - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase1/transferinitiationrequest": { + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest": { "post": { "x-hyperledger-cacti": { "http": { "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase1/transferinitiationrequest" + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest" } }, "operationId": "phase1TransferInitiationRequestV1", @@ -1314,12 +1314,12 @@ } } }, - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/transfercommencerequest": { + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest": { "post": { "x-hyperledger-cacti": { "http": { "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/transfercommencerequest" + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest" } }, "operationId": "phase2TransferCommenceRequestV1", @@ -1340,12 +1340,12 @@ } } }, - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/lockevidencerequest": { + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest": { "post": { "x-hyperledger-cacti": { "http": { "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/lockevidencerequest" + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest" } }, "operationId": "phase2LockEvidenceRequestV1", @@ -1366,12 +1366,12 @@ } } }, - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitpreparationrequest": { + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest": { "post": { "x-hyperledger-cacti": { "http": { "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitpreparationrequest" + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest" } }, "operationId": "phase3CommitPreparationRequestV1", @@ -1392,12 +1392,12 @@ } } }, - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitfinalrequest": { + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest": { "post": { "x-hyperledger-cacti": { "http": { "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitfinalrequest" + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest" } }, "operationId": "phase3CommitFinalRequestV1", @@ -1418,12 +1418,12 @@ } } }, - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/transfercompleterequest": { + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest": { "get": { "x-hyperledger-cacti": { "http": { "verbLowerCase": "get", - "path": "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/transfercompleterequest" + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest" } }, "operationId": "phase3TransferCompleteRequestV1", @@ -1444,12 +1444,12 @@ } } }, - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest": { + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest": { "post": { "x-hyperledger-cacti": { "http": { "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest" + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest" } }, "operationId": "clientRequestV1", @@ -1475,12 +1475,12 @@ } } }, - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase1/transferinitiationresponse": { + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse": { "post": { "x-hyperledger-cacti": { "http": { "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase1/transferinitiationresponse" + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse" } }, "operationId": "phase1TransferInitiationResponseV1", @@ -1501,12 +1501,12 @@ } } }, - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/transfercommenceresponse": { + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse": { "post": { "x-hyperledger-cacti": { "http": { "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/transfercommenceresponse" + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse" } }, "operationId": "phase2TransferCommenceResponseV1", @@ -1527,12 +1527,12 @@ } } }, - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/lockevidenceresponse": { + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse": { "post": { "x-hyperledger-cacti": { "http": { "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/lockevidenceresponse" + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse" } }, "operationId": "phase2LockEvidenceResponseV1", @@ -1553,12 +1553,12 @@ } } }, - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitpreparationresponse": { + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse": { "post": { "x-hyperledger-cacti": { "http": { "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitpreparationresponse" + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse" } }, "operationId": "phase3CommitPreparationResponseV1", @@ -1579,12 +1579,12 @@ } } }, - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitfinalresponse": { + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse": { "post": { "x-hyperledger-cacti": { "http": { "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitfinalresponse" + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse" } }, "operationId": "phase3CommitFinalResponseV1", @@ -1605,12 +1605,12 @@ } } }, - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/recovermessage": { + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage": { "post": { "x-hyperledger-cacti": { "http": { "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-odap-hermes/recovermessage" + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage" } }, "operationId": "RecoverV1Message", @@ -1631,12 +1631,12 @@ } } }, - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/recoverupdatemessage": { + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage": { "post": { "x-hyperledger-cacti": { "http": { "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-odap-hermes/recoverupdatemessage" + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage" } }, "operationId": "RecoverUpdateV1Message", @@ -1657,12 +1657,12 @@ } } }, - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/recoverupdateackmessage": { + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage": { "post": { "x-hyperledger-cacti": { "http": { "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-odap-hermes/recoverupdateackmessage" + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage" } }, "operationId": "RecoverUpdateAckV1Message", @@ -1683,12 +1683,12 @@ } } }, - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/recoversuccessmessage": { + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage": { "post": { "x-hyperledger-cacti": { "http": { "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-odap-hermes/recoversuccessmessage" + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage" } }, "operationId": "RecoverV1Success", @@ -1709,12 +1709,12 @@ } } }, - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/rollbackmessage": { + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage": { "post": { "x-hyperledger-cacti": { "http": { "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-odap-hermes/rollbackmessage" + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage" } }, "operationId": "RollbackV1Message", @@ -1735,12 +1735,12 @@ } } }, - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/rollbackackmessage": { + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage": { "post": { "x-hyperledger-cacti": { "http": { "verbLowerCase": "post", - "path": "/api/v1/@hyperledger/cactus-plugin-odap-hermes/rollbackackmessage" + "path": "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage" } }, "operationId": "RollbackAckV1Message", diff --git a/packages/cactus-plugin-odap-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 similarity index 98% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/FILES index 54b948c8a5..be28f6e89f 100644 --- a/packages/cactus-plugin-odap-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 @@ -30,9 +30,9 @@ 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/OdapLocalLog.kt src/main/kotlin/org/openapitools/client/models/OdapMessage.kt src/main/kotlin/org/openapitools/client/models/OdapMessageActionResponse.kt src/main/kotlin/org/openapitools/client/models/PayloadProfile.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/.openapi-generator/VERSION diff --git a/packages/cactus-plugin-odap-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 similarity index 84% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/README.md rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/README.md index 4f2fa92760..7c7825dc52 100644 --- a/packages/cactus-plugin-odap-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 @@ -44,24 +44,24 @@ All URIs are relative to *http://localhost* Class | Method | HTTP request | Description ------------ | ------------- | ------------- | ------------- -*DefaultApi* | [**clientRequestV1**](docs/DefaultApi.md#clientrequestv1) | **POST** /api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest | -*DefaultApi* | [**phase1TransferInitiationRequestV1**](docs/DefaultApi.md#phase1transferinitiationrequestv1) | **POST** /api/v1/@hyperledger/cactus-plugin-odap-hermes/phase1/transferinitiationrequest | -*DefaultApi* | [**phase1TransferInitiationResponseV1**](docs/DefaultApi.md#phase1transferinitiationresponsev1) | **POST** /api/v1/@hyperledger/cactus-plugin-odap-hermes/phase1/transferinitiationresponse | -*DefaultApi* | [**phase2LockEvidenceRequestV1**](docs/DefaultApi.md#phase2lockevidencerequestv1) | **POST** /api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/lockevidencerequest | -*DefaultApi* | [**phase2LockEvidenceResponseV1**](docs/DefaultApi.md#phase2lockevidenceresponsev1) | **POST** /api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/lockevidenceresponse | -*DefaultApi* | [**phase2TransferCommenceRequestV1**](docs/DefaultApi.md#phase2transfercommencerequestv1) | **POST** /api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/transfercommencerequest | -*DefaultApi* | [**phase2TransferCommenceResponseV1**](docs/DefaultApi.md#phase2transfercommenceresponsev1) | **POST** /api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/transfercommenceresponse | -*DefaultApi* | [**phase3CommitFinalRequestV1**](docs/DefaultApi.md#phase3commitfinalrequestv1) | **POST** /api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitfinalrequest | -*DefaultApi* | [**phase3CommitFinalResponseV1**](docs/DefaultApi.md#phase3commitfinalresponsev1) | **POST** /api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitfinalresponse | -*DefaultApi* | [**phase3CommitPreparationRequestV1**](docs/DefaultApi.md#phase3commitpreparationrequestv1) | **POST** /api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitpreparationrequest | -*DefaultApi* | [**phase3CommitPreparationResponseV1**](docs/DefaultApi.md#phase3commitpreparationresponsev1) | **POST** /api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitpreparationresponse | -*DefaultApi* | [**phase3TransferCompleteRequestV1**](docs/DefaultApi.md#phase3transfercompleterequestv1) | **GET** /api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/transfercompleterequest | -*DefaultApi* | [**recoverUpdateAckV1Message**](docs/DefaultApi.md#recoverupdateackv1message) | **POST** /api/v1/@hyperledger/cactus-plugin-odap-hermes/recoverupdateackmessage | -*DefaultApi* | [**recoverUpdateV1Message**](docs/DefaultApi.md#recoverupdatev1message) | **POST** /api/v1/@hyperledger/cactus-plugin-odap-hermes/recoverupdatemessage | -*DefaultApi* | [**recoverV1Message**](docs/DefaultApi.md#recoverv1message) | **POST** /api/v1/@hyperledger/cactus-plugin-odap-hermes/recovermessage | -*DefaultApi* | [**recoverV1Success**](docs/DefaultApi.md#recoverv1success) | **POST** /api/v1/@hyperledger/cactus-plugin-odap-hermes/recoversuccessmessage | -*DefaultApi* | [**rollbackAckV1Message**](docs/DefaultApi.md#rollbackackv1message) | **POST** /api/v1/@hyperledger/cactus-plugin-odap-hermes/rollbackackmessage | -*DefaultApi* | [**rollbackV1Message**](docs/DefaultApi.md#rollbackv1message) | **POST** /api/v1/@hyperledger/cactus-plugin-odap-hermes/rollbackmessage | +*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 | @@ -76,9 +76,9 @@ Class | Method | HTTP request | Description - [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.OdapLocalLog](docs/OdapLocalLog.md) - [org.openapitools.client.models.OdapMessage](docs/OdapMessage.md) - [org.openapitools.client.models.OdapMessageActionResponse](docs/OdapMessageActionResponse.md) - [org.openapitools.client.models.PayloadProfile](docs/PayloadProfile.md) diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/build.gradle rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/build.gradle diff --git a/packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/gradlew b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/gradlew similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/gradlew rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/gradlew diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/gradlew.bat diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/settings.gradle diff --git a/packages/cactus-plugin-odap-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 similarity index 98% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/apis/DefaultApi.kt index aada4a542e..35526c0a9a 100644 --- a/packages/cactus-plugin-odap-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 @@ -126,7 +126,7 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient return RequestConfig( method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest", + path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest", query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = false, @@ -195,7 +195,7 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient return RequestConfig( method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase1/transferinitiationrequest", + path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest", query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = false, @@ -264,7 +264,7 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient return RequestConfig( method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase1/transferinitiationresponse", + path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse", query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = false, @@ -333,7 +333,7 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient return RequestConfig( method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/lockevidencerequest", + path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest", query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = false, @@ -402,7 +402,7 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient return RequestConfig( method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/lockevidenceresponse", + path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse", query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = false, @@ -471,7 +471,7 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient return RequestConfig( method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/transfercommencerequest", + path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest", query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = false, @@ -540,7 +540,7 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient return RequestConfig( method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/transfercommenceresponse", + path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse", query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = false, @@ -609,7 +609,7 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient return RequestConfig( method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitfinalrequest", + path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest", query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = false, @@ -678,7 +678,7 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient return RequestConfig( method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitfinalresponse", + path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse", query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = false, @@ -747,7 +747,7 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient return RequestConfig( method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitpreparationrequest", + path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest", query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = false, @@ -816,7 +816,7 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient return RequestConfig( method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitpreparationresponse", + path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse", query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = false, @@ -885,7 +885,7 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient return RequestConfig( method = RequestMethod.GET, - path = "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/transfercompleterequest", + path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest", query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = false, @@ -954,7 +954,7 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient return RequestConfig( method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-odap-hermes/recoverupdateackmessage", + path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage", query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = false, @@ -1023,7 +1023,7 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient return RequestConfig( method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-odap-hermes/recoverupdatemessage", + path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage", query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = false, @@ -1092,7 +1092,7 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient return RequestConfig( method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-odap-hermes/recovermessage", + path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage", query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = false, @@ -1161,7 +1161,7 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient return RequestConfig( method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-odap-hermes/recoversuccessmessage", + path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage", query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = false, @@ -1230,7 +1230,7 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient return RequestConfig( method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-odap-hermes/rollbackackmessage", + path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage", query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = false, @@ -1299,7 +1299,7 @@ class DefaultApi(basePath: kotlin.String = defaultBasePath, client: OkHttpClient return RequestConfig( method = RequestMethod.POST, - path = "/api/v1/@hyperledger/cactus-plugin-odap-hermes/rollbackmessage", + path = "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage", query = localVariableQuery, headers = localVariableHeaders, requiresAuthentication = false, diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiAbstractions.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiClient.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ApiResponse.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigDecimalAdapter.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/BigIntegerAdapter.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ByteArrayAdapter.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Errors.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateAdapter.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/LocalDateTimeAdapter.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/OffsetDateTimeAdapter.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/PartConfig.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestConfig.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/RequestMethod.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/ResponseExtensions.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/Serializer.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/URIAdapter.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/infrastructure/UUIDAdapter.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/AssetProfile.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/AssetProfile.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClientV1Request.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClientV1Request.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClientV1RequestClientGatewayConfiguration.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/ClientV1RequestClientGatewayConfiguration.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitFinalV1Request.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitFinalV1Request.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitFinalV1Response.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitFinalV1Response.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitPreparationV1Request.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitPreparationV1Request.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitPreparationV1Response.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CommitPreparationV1Response.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CredentialProfile.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/CredentialProfile.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/History.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/History.kt diff --git a/packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/OdapLocalLog.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LocalLog.kt similarity index 97% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/OdapLocalLog.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LocalLog.kt index 2137f6736d..2e97f18138 100644 --- a/packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/OdapLocalLog.kt +++ b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LocalLog.kt @@ -31,7 +31,7 @@ import com.squareup.moshi.JsonClass */ -data class OdapLocalLog ( +data class LocalLog ( @Json(name = "sessionID") val sessionID: kotlin.String, diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LockEvidenceV1Request.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LockEvidenceV1Request.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LockEvidenceV1Response.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/LockEvidenceV1Response.kt diff --git a/packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/OdapMessage.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/OdapMessage.kt similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/OdapMessage.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/OdapMessage.kt diff --git a/packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/OdapMessageActionResponse.kt b/packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/OdapMessageActionResponse.kt similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/OdapMessageActionResponse.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/OdapMessageActionResponse.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/PayloadProfile.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/PayloadProfile.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverSuccessV1Message.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverSuccessV1Message.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverUpdateAckV1Message.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverUpdateAckV1Message.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 85% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverUpdateV1Message.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverUpdateV1Message.kt index 3d2e0894fa..67ed45d0ce 100644 --- a/packages/cactus-plugin-odap-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 @@ -15,7 +15,7 @@ package org.openapitools.client.models -import org.openapitools.client.models.OdapLocalLog +import org.openapitools.client.models.LocalLog import com.squareup.moshi.Json import com.squareup.moshi.JsonClass @@ -35,7 +35,7 @@ data class RecoverUpdateV1Message ( val sessionID: kotlin.String, @Json(name = "recoveredLogs") - val recoveredLogs: kotlin.collections.List, + val recoveredLogs: kotlin.collections.List, @Json(name = "signature") val signature: kotlin.String diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverV1Message.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RecoverV1Message.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RollbackAckV1Message.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RollbackAckV1Message.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RollbackV1Message.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/RollbackV1Message.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SessionData.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/SessionData.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCommenceV1Request.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCommenceV1Request.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCommenceV1Response.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCommenceV1Response.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCompleteV1Request.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferCompleteV1Request.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferInitializationV1Request.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferInitializationV1Request.kt diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferInitializationV1Response.kt rename to packages/cactus-plugin-satp-hermes/src/main/kotlin/generated/openapi/kotlin-client/src/main/kotlin/org/openapitools/client/models/TransferInitializationV1Response.kt diff --git a/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/besu-odap-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/besu-satp-gateway.ts similarity index 95% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/besu-odap-gateway.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/besu-satp-gateway.ts index 216ab28644..478d3e3819 100644 --- a/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/besu-odap-gateway.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/besu-satp-gateway.ts @@ -8,15 +8,15 @@ import { EthContractInvocationType, InvokeContractV1Request as BesuInvokeContractV1Request, } from "@hyperledger/cactus-plugin-ledger-connector-besu"; -import { IOdapPluginKeyPair, PluginOdapGateway } from "./plugin-odap-gateway"; +import { IKeyPair, PluginSatpGateway } from "./plugin-satp-gateway"; import { ClientGatewayHelper } from "./client/client-helper"; import { ServerGatewayHelper } from "./server/server-helper"; -export interface IBesuOdapGatewayConstructorOptions { +export interface IBesuSatpGatewayConstructorOptions { name: string; dltIDs: string[]; instanceId: string; - keyPair?: IOdapPluginKeyPair; + keyPair?: IKeyPair; backupGatewaysAllowed?: string[]; ipfsPath?: string; besuPath?: string; @@ -29,13 +29,13 @@ export interface IBesuOdapGatewayConstructorOptions { serverHelper: ServerGatewayHelper; } -export class BesuOdapGateway extends PluginOdapGateway { +export class BesuSatpGateway extends PluginSatpGateway { public besuApi?: BesuApi; public besuContractName?: string; public besuWeb3SigningCredential?: Web3SigningCredential; public besuKeychainId?: string; - public constructor(options: IBesuOdapGatewayConstructorOptions) { + public constructor(options: IBesuSatpGatewayConstructorOptions) { super({ name: options.name, dltIDs: options.dltIDs, @@ -52,7 +52,7 @@ export class BesuOdapGateway extends PluginOdapGateway { } private defineBesuConnection( - options: IBesuOdapGatewayConstructorOptions, + options: IBesuSatpGatewayConstructorOptions, ): void { const fnTag = `${this.className}#defineBesuConnection()`; @@ -88,7 +88,7 @@ export class BesuOdapGateway extends PluginOdapGateway { let besuCreateAssetProof = ""; - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "exec", operation: "create-asset", @@ -136,14 +136,14 @@ export class BesuOdapGateway extends PluginOdapGateway { `${fnTag}, proof of the asset creation: ${besuCreateAssetProof}`, ); - await this.storeOdapProof({ + await this.storeProof({ sessionID: sessionID, type: "proof", operation: "create", data: besuCreateAssetProof, }); - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "done", operation: "create-asset", @@ -172,7 +172,7 @@ export class BesuOdapGateway extends PluginOdapGateway { assetId = sessionData.sourceLedgerAssetID; } - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "exec-rollback", operation: "lock-asset", @@ -220,14 +220,14 @@ export class BesuOdapGateway extends PluginOdapGateway { this.log.info(`${fnTag}, proof of the asset lock: ${besuLockAssetProof}`); - await this.storeOdapProof({ + await this.storeProof({ sessionID: sessionID, type: "proof-rollback", operation: "lock", data: besuLockAssetProof, }); - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "done-rollback", operation: "lock-asset", @@ -252,7 +252,7 @@ export class BesuOdapGateway extends PluginOdapGateway { let besuUnlockAssetProof = ""; - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "exec-rollback", operation: "unlock-asset", @@ -302,14 +302,14 @@ export class BesuOdapGateway extends PluginOdapGateway { `${fnTag}, proof of the asset unlock: ${besuUnlockAssetProof}`, ); - await this.storeOdapProof({ + await this.storeProof({ sessionID: sessionID, type: "proof-rollback", operation: "unlock", data: besuUnlockAssetProof, }); - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "done-rollback", operation: "unlock-asset", @@ -341,7 +341,7 @@ export class BesuOdapGateway extends PluginOdapGateway { assetID = sessionData.sourceLedgerAssetID; } - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "exec-rollback", operation: "delete-asset", @@ -402,14 +402,14 @@ export class BesuOdapGateway extends PluginOdapGateway { `${fnTag}, proof of the asset deletion: ${besuDeleteAssetProof}`, ); - await this.storeOdapProof({ + await this.storeProof({ sessionID: sessionID, type: "proof-rollback", operation: "delete", data: besuDeleteAssetProof, }); - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "done-rollback", operation: "delete-asset", diff --git a/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/client/client-helper.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/client/client-helper.ts similarity index 84% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/client/client-helper.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/client/client-helper.ts index be92bf19da..e612c324b2 100644 --- a/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/client/client-helper.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/client/client-helper.ts @@ -13,7 +13,7 @@ import { CommitFinalV1Response, TransferCompleteV1Request, } from "../../public-api"; -import { OdapMessageType, PluginOdapGateway } from "../plugin-odap-gateway"; +import { OdapMessageType, PluginSatpGateway } from "../plugin-satp-gateway"; export class ClientGatewayHelper { public static readonly CLASS_NAME = "ClientGatewayHelper"; @@ -35,12 +35,12 @@ export class ClientGatewayHelper { async sendTransferInitializationRequest( sessionID: string, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, remote: boolean, ): Promise { const fnTag = `${this.className}#sendTransferInitializationRequest()`; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if ( sessionData == undefined || @@ -66,7 +66,7 @@ export class ClientGatewayHelper { throw new Error(`${fnTag}, session data is not correctly initialized`); } - if (!odap.supportedDltIDs.includes(sessionData.recipientGatewayDltSystem)) { + if (!gateway.supportedDltIDs.includes(sessionData.recipientGatewayDltSystem)) { throw new Error( `${fnTag}, recipient gateway dlt system is not supported by this gateway`, ); @@ -83,7 +83,7 @@ export class ClientGatewayHelper { loggingProfile: sessionData.loggingProfile, accessControlProfile: sessionData.accessControlProfile, signature: "", - sourceGatewayPubkey: odap.pubKey, + sourceGatewayPubkey: gateway.pubKey, sourceGatewayDltSystem: sessionData.sourceGatewayDltSystem, recipientGatewayPubkey: sessionData.recipientGatewayPubkey, recipientGatewayDltSystem: sessionData.recipientGatewayDltSystem, @@ -102,8 +102,8 @@ export class ClientGatewayHelper { sourceLedgerAssetID: sessionData.sourceLedgerAssetID, }; - const messageSignature = PluginOdapGateway.bufArray2HexStr( - odap.sign(JSON.stringify(initializationRequestMessage)), + const messageSignature = PluginSatpGateway.bufArray2HexStr( + gateway.sign(JSON.stringify(initializationRequestMessage)), ); initializationRequestMessage.signature = messageSignature; @@ -114,9 +114,9 @@ export class ClientGatewayHelper { sessionData.clientSignatureInitializationRequestMessage = messageSignature; - odap.sessions.set(sessionID, sessionData); + gateway.sessions.set(sessionID, sessionData); - await odap.storeOdapLog({ + await gateway.storeLog({ sessionID: sessionID, type: "init", operation: "validate", @@ -129,9 +129,9 @@ export class ClientGatewayHelper { return initializationRequestMessage; } - await odap.makeRequest( + await gateway.makeRequest( sessionID, - PluginOdapGateway.getOdapAPI( + PluginSatpGateway.getOdapAPI( sessionData.recipientBasePath, ).phase1TransferInitiationRequestV1(initializationRequestMessage), "TransferInitializationRequest", @@ -140,12 +140,12 @@ export class ClientGatewayHelper { async checkValidInitializationResponse( response: TransferInitializationV1Response, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, ): Promise { const fnTag = `${this.className}#checkValidInitializationResponse`; const sessionID = response.sessionID; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if (sessionData == undefined) { throw new Error(`${fnTag}, session data is undefined`); } @@ -177,7 +177,7 @@ export class ClientGatewayHelper { ); } - if (!odap.verifySignature(response, sessionData.recipientGatewayPubkey)) { + if (!gateway.verifySignature(response, sessionData.recipientGatewayPubkey)) { throw new Error( `${fnTag}, TransferInitializationResponse message signature verification failed`, ); @@ -198,18 +198,18 @@ export class ClientGatewayHelper { sessionData.step = 3; - odap.sessions.set(sessionData.id, sessionData); + gateway.sessions.set(sessionData.id, sessionData); this.log.info(`TransferInitializationResponse passed all checks.`); } async sendTransferCommenceRequest( sessionID: string, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, remote: boolean, ): Promise { - const fnTag = `${odap.className}#sendTransferCommenceRequest()`; + const fnTag = `${gateway.className}#sendTransferCommenceRequest()`; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if ( sessionData == undefined || @@ -252,8 +252,8 @@ export class ClientGatewayHelper { sequenceNumber: ++sessionData.lastSequenceNumber, }; - const messageSignature = PluginOdapGateway.bufArray2HexStr( - odap.sign(JSON.stringify(transferCommenceRequestMessage)), + const messageSignature = PluginSatpGateway.bufArray2HexStr( + gateway.sign(JSON.stringify(transferCommenceRequestMessage)), ); transferCommenceRequestMessage.signature = messageSignature; @@ -265,9 +265,9 @@ export class ClientGatewayHelper { sessionData.clientSignatureTransferCommenceRequestMessage = messageSignature; - odap.sessions.set(sessionID, sessionData); + gateway.sessions.set(sessionID, sessionData); - await odap.storeOdapLog({ + await gateway.storeLog({ sessionID: sessionID, type: "init", operation: "commence", @@ -280,9 +280,9 @@ export class ClientGatewayHelper { return transferCommenceRequestMessage; } - await odap.makeRequest( + await gateway.makeRequest( sessionID, - PluginOdapGateway.getOdapAPI( + PluginSatpGateway.getOdapAPI( sessionData.recipientBasePath, ).phase2TransferCommenceRequestV1(transferCommenceRequestMessage), "TransferCommenceRequest", @@ -291,12 +291,12 @@ export class ClientGatewayHelper { async checkValidTransferCommenceResponse( response: TransferCommenceV1Response, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, ): Promise { - const fnTag = `${odap.className}#checkValidTransferCommenceResponse`; + const fnTag = `${gateway.className}#checkValidTransferCommenceResponse`; const sessionID = response.sessionID; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if (sessionData == undefined) { throw new Error(`${fnTag}, session data is undefined`); } @@ -334,7 +334,7 @@ export class ClientGatewayHelper { ); } - if (!odap.verifySignature(response, sessionData.recipientGatewayPubkey)) { + if (!gateway.verifySignature(response, sessionData.recipientGatewayPubkey)) { throw new Error( `${fnTag}, TransferCommenceResponse message signature verification failed`, ); @@ -349,19 +349,19 @@ export class ClientGatewayHelper { sessionData.step = 5; - odap.sessions.set(sessionID, sessionData); + gateway.sessions.set(sessionID, sessionData); this.log.info(`TransferCommenceResponse passed all checks.`); } async sendLockEvidenceRequest( sessionID: string, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, remote: boolean, ): Promise { - const fnTag = `${odap.className}#sendLockEvidenceRequest()`; + const fnTag = `${gateway.className}#sendLockEvidenceRequest()`; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if ( sessionData == undefined || @@ -393,8 +393,8 @@ export class ClientGatewayHelper { sequenceNumber: ++sessionData.lastSequenceNumber, }; - const messageSignature = PluginOdapGateway.bufArray2HexStr( - odap.sign(JSON.stringify(lockEvidenceRequestMessage)), + const messageSignature = PluginSatpGateway.bufArray2HexStr( + gateway.sign(JSON.stringify(lockEvidenceRequestMessage)), ); lockEvidenceRequestMessage.signature = messageSignature; @@ -405,9 +405,9 @@ export class ClientGatewayHelper { sessionData.clientSignatureLockEvidenceRequestMessage = messageSignature; - odap.sessions.set(sessionID, sessionData); + gateway.sessions.set(sessionID, sessionData); - await odap.storeOdapLog({ + await gateway.storeLog({ sessionID: sessionID, type: "init", operation: "lock", @@ -420,9 +420,9 @@ export class ClientGatewayHelper { return lockEvidenceRequestMessage; } - await odap.makeRequest( + await gateway.makeRequest( sessionID, - PluginOdapGateway.getOdapAPI( + PluginSatpGateway.getOdapAPI( sessionData.recipientBasePath, ).phase2LockEvidenceRequestV1(lockEvidenceRequestMessage), "LockEvidenceRequest", @@ -431,12 +431,12 @@ export class ClientGatewayHelper { async checkValidLockEvidenceResponse( response: LockEvidenceV1Response, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, ): Promise { - const fnTag = `${odap.className}#checkValidLockEvidenceResponse`; + const fnTag = `${gateway.className}#checkValidLockEvidenceResponse`; const sessionID = response.sessionID; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if (sessionData == undefined) { throw new Error( `${fnTag}, reverting transfer because session data is undefined`, @@ -474,7 +474,7 @@ export class ClientGatewayHelper { ); } - if (!odap.verifySignature(response, sessionData.recipientGatewayPubkey)) { + if (!gateway.verifySignature(response, sessionData.recipientGatewayPubkey)) { throw new Error( `${fnTag}, LockEvidenceResponse message signature verification failed`, ); @@ -488,19 +488,19 @@ export class ClientGatewayHelper { sessionData.step = 7; - odap.sessions.set(sessionID, sessionData); + gateway.sessions.set(sessionID, sessionData); this.log.info(`LockEvidenceResponse passed all checks.`); } async sendCommitPreparationRequest( sessionID: string, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, remote: boolean, ): Promise { - const fnTag = `${odap.className}#sendCommitPreparationRequest()`; + const fnTag = `${gateway.className}#sendCommitPreparationRequest()`; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if ( sessionData == undefined || @@ -526,8 +526,8 @@ export class ClientGatewayHelper { sequenceNumber: ++sessionData.lastSequenceNumber, }; - const messageSignature = PluginOdapGateway.bufArray2HexStr( - odap.sign(JSON.stringify(commitPrepareRequestMessage)), + const messageSignature = PluginSatpGateway.bufArray2HexStr( + gateway.sign(JSON.stringify(commitPrepareRequestMessage)), ); commitPrepareRequestMessage.signature = messageSignature; @@ -539,9 +539,9 @@ export class ClientGatewayHelper { sessionData.clientSignatureCommitPreparationRequestMessage = messageSignature; - odap.sessions.set(sessionID, sessionData); + gateway.sessions.set(sessionID, sessionData); - await odap.storeOdapLog({ + await gateway.storeLog({ sessionID: sessionID, type: "init", operation: "prepare", @@ -554,9 +554,9 @@ export class ClientGatewayHelper { return commitPrepareRequestMessage; } - await odap.makeRequest( + await gateway.makeRequest( sessionID, - PluginOdapGateway.getOdapAPI( + PluginSatpGateway.getOdapAPI( sessionData.recipientBasePath, ).phase3CommitPreparationRequestV1(commitPrepareRequestMessage), "CommitPreparationRequest", @@ -565,12 +565,12 @@ export class ClientGatewayHelper { async checkValidCommitPreparationResponse( response: CommitPreparationV1Response, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, ): Promise { - const fnTag = `${odap.className}#checkValidCommitPreparationResponse`; + const fnTag = `${gateway.className}#checkValidCommitPreparationResponse`; const sessionID = response.sessionID; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if (sessionData == undefined) { throw new Error( `${fnTag}, reverting transfer because session data is undefined`, @@ -609,7 +609,7 @@ export class ClientGatewayHelper { ); } - if (!odap.verifySignature(response, sessionData.recipientGatewayPubkey)) { + if (!gateway.verifySignature(response, sessionData.recipientGatewayPubkey)) { throw new Error( `${fnTag}, CommitPreparationResponse message signature verification failed`, ); @@ -624,19 +624,19 @@ export class ClientGatewayHelper { sessionData.step = 9; - odap.sessions.set(sessionID, sessionData); + gateway.sessions.set(sessionID, sessionData); this.log.info(`CommitPreparationResponse passed all checks.`); } async sendCommitFinalRequest( sessionID: string, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, remote: boolean, ): Promise { - const fnTag = `${odap.className}#sendCommitFinalRequest()`; + const fnTag = `${gateway.className}#sendCommitFinalRequest()`; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if ( sessionData == undefined || @@ -665,8 +665,8 @@ export class ClientGatewayHelper { sequenceNumber: ++sessionData.lastSequenceNumber, }; - const messageSignature = PluginOdapGateway.bufArray2HexStr( - odap.sign(JSON.stringify(commitFinalRequestMessage)), + const messageSignature = PluginSatpGateway.bufArray2HexStr( + gateway.sign(JSON.stringify(commitFinalRequestMessage)), ); commitFinalRequestMessage.signature = messageSignature; @@ -677,9 +677,9 @@ export class ClientGatewayHelper { sessionData.clientSignatureCommitFinalRequestMessage = messageSignature; - odap.sessions.set(sessionID, sessionData); + gateway.sessions.set(sessionID, sessionData); - await odap.storeOdapLog({ + await gateway.storeLog({ sessionID: sessionID, type: "init", operation: "final", @@ -692,9 +692,9 @@ export class ClientGatewayHelper { return commitFinalRequestMessage; } - await odap.makeRequest( + await gateway.makeRequest( sessionID, - PluginOdapGateway.getOdapAPI( + PluginSatpGateway.getOdapAPI( sessionData.recipientBasePath, ).phase3CommitFinalRequestV1(commitFinalRequestMessage), "CommitFinalRequest", @@ -703,12 +703,12 @@ export class ClientGatewayHelper { async checkValidCommitFinalResponse( response: CommitFinalV1Response, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, ): Promise { - const fnTag = `${odap.className}#checkValidCommitFinalResponse`; + const fnTag = `${gateway.className}#checkValidCommitFinalResponse`; const sessionID = response.sessionID; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if (sessionData == undefined) { throw new Error( `${fnTag}, reverting transfer because session data is undefined`, @@ -747,15 +747,15 @@ export class ClientGatewayHelper { ); } - if (!odap.verifySignature(response, sessionData.recipientGatewayPubkey)) { + if (!gateway.verifySignature(response, sessionData.recipientGatewayPubkey)) { throw new Error( `${fnTag}, CommitFinalResponse message signature verification failed`, ); } const claimHash = SHA256(response.commitAcknowledgementClaim).toString(); - const retrievedClaim = await odap.getLogFromIPFS( - PluginOdapGateway.getOdapLogKey(sessionID, "proof", "create"), + const retrievedClaim = await gateway.getLogFromIPFS( + PluginSatpGateway.getOdapLogKey(sessionID, "proof", "create"), ); if (claimHash != retrievedClaim.hash) { @@ -764,7 +764,7 @@ export class ClientGatewayHelper { ); } - if (!odap.verifySignature(retrievedClaim, response.serverIdentityPubkey)) { + if (!gateway.verifySignature(retrievedClaim, response.serverIdentityPubkey)) { throw new Error( `${fnTag}, Commit Acknowledgement Claim signature verification failed`, ); @@ -781,19 +781,19 @@ export class ClientGatewayHelper { sessionData.step = 11; - odap.sessions.set(sessionID, sessionData); + gateway.sessions.set(sessionID, sessionData); this.log.info(`CommitFinalResponse passed all checks.`); } async sendTransferCompleteRequest( sessionID: string, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, remote: boolean, ): Promise { - const fnTag = `${odap.className}#sendTransferCompleteRequest()`; + const fnTag = `${gateway.className}#sendTransferCompleteRequest()`; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if ( sessionData == undefined || @@ -821,8 +821,8 @@ export class ClientGatewayHelper { sequenceNumber: ++sessionData.lastSequenceNumber, }; - const messageSignature = PluginOdapGateway.bufArray2HexStr( - odap.sign(JSON.stringify(transferCompleteRequestMessage)), + const messageSignature = PluginSatpGateway.bufArray2HexStr( + gateway.sign(JSON.stringify(transferCompleteRequestMessage)), ); transferCompleteRequestMessage.signature = messageSignature; @@ -833,9 +833,9 @@ export class ClientGatewayHelper { sessionData.clientSignatureTransferCompleteMessage = messageSignature; - odap.sessions.set(sessionID, sessionData); + gateway.sessions.set(sessionID, sessionData); - await odap.storeOdapLog({ + await gateway.storeLog({ sessionID: sessionID, type: "init", operation: "complete", @@ -848,9 +848,9 @@ export class ClientGatewayHelper { return transferCompleteRequestMessage; } - await odap.makeRequest( + await gateway.makeRequest( sessionID, - PluginOdapGateway.getOdapAPI( + PluginSatpGateway.getOdapAPI( sessionData.recipientBasePath, ).phase3TransferCompleteRequestV1(transferCompleteRequestMessage), "TransferCompleteRequest", diff --git a/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/fabric-odap-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/fabric-satp-gateway.ts similarity index 95% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/fabric-odap-gateway.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/fabric-satp-gateway.ts index 1bbbadb56a..83b5dc0db3 100644 --- a/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/fabric-odap-gateway.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/fabric-satp-gateway.ts @@ -7,16 +7,16 @@ import { FabricSigningCredential, RunTransactionRequest as FabricRunTransactionRequest, } from "@hyperledger/cactus-plugin-ledger-connector-fabric"; -import { IOdapPluginKeyPair, PluginOdapGateway } from "./plugin-odap-gateway"; +import { IKeyPair, PluginSatpGateway } from "./plugin-satp-gateway"; import { SessionDataRollbackActionsPerformedEnum } from "../generated/openapi/typescript-axios"; import { ClientGatewayHelper } from "./client/client-helper"; import { ServerGatewayHelper } from "./server/server-helper"; -export interface IFabricOdapGatewayConstructorOptions { +export interface IFabricSatpGatewayConstructorOptions { name: string; dltIDs: string[]; instanceId: string; - keyPair?: IOdapPluginKeyPair; + keyPair?: IKeyPair; backupGatewaysAllowed?: string[]; ipfsPath?: string; fabricPath?: string; @@ -28,13 +28,13 @@ export interface IFabricOdapGatewayConstructorOptions { serverHelper: ServerGatewayHelper; } -export class FabricOdapGateway extends PluginOdapGateway { +export class FabricSatpGateway extends PluginSatpGateway { public fabricApi?: FabricApi; public fabricSigningCredential?: FabricSigningCredential; public fabricChannelName?: string; public fabricContractName?: string; - public constructor(options: IFabricOdapGatewayConstructorOptions) { + public constructor(options: IFabricSatpGatewayConstructorOptions) { super({ name: options.name, dltIDs: options.dltIDs, @@ -51,7 +51,7 @@ export class FabricOdapGateway extends PluginOdapGateway { } private defineFabricConnection( - options: IFabricOdapGatewayConstructorOptions, + options: IFabricSatpGatewayConstructorOptions, ): void { const fnTag = `${this.className}#defineFabricConnection()`; @@ -87,7 +87,7 @@ export class FabricOdapGateway extends PluginOdapGateway { assetId = sessionData.sourceLedgerAssetID; } - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "exec", operation: "lock-asset", @@ -125,14 +125,14 @@ export class FabricOdapGateway extends PluginOdapGateway { this.log.info(`${fnTag}, proof of the asset lock: ${fabricLockAssetProof}`); - await this.storeOdapProof({ + await this.storeProof({ sessionID: sessionID, type: "proof", operation: "lock", data: fabricLockAssetProof, }); - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "done", operation: "lock-asset", @@ -157,7 +157,7 @@ export class FabricOdapGateway extends PluginOdapGateway { let fabricUnlockAssetProof = ""; - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "exec-rollback", operation: "unlock-asset", @@ -198,14 +198,14 @@ export class FabricOdapGateway extends PluginOdapGateway { `${fnTag}, proof of the asset unlock: ${fabricUnlockAssetProof}`, ); - await this.storeOdapProof({ + await this.storeProof({ sessionID: sessionID, type: "proof-rollback", operation: "unlock", data: fabricUnlockAssetProof, }); - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "done-rollback", operation: "unlock-asset", @@ -230,7 +230,7 @@ export class FabricOdapGateway extends PluginOdapGateway { assetId = sessionData.sourceLedgerAssetID; } - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "exec", operation: "delete-asset", @@ -269,14 +269,14 @@ export class FabricOdapGateway extends PluginOdapGateway { `${fnTag}, proof of the asset deletion: ${fabricDeleteAssetProof}`, ); - await this.storeOdapProof({ + await this.storeProof({ sessionID: sessionID, type: "proof", operation: "delete", data: fabricDeleteAssetProof, }); - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "done", operation: "delete-asset", @@ -311,7 +311,7 @@ export class FabricOdapGateway extends PluginOdapGateway { assetID = sessionData.recipientLedgerAssetID; } - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "exec-rollback", operation: "create-asset", @@ -353,14 +353,14 @@ export class FabricOdapGateway extends PluginOdapGateway { `${fnTag}, proof of the asset creation: ${fabricCreateAssetProof}`, ); - await this.storeOdapProof({ + await this.storeProof({ sessionID: sessionID, type: "proof-rollback", operation: "create", data: fabricCreateAssetProof, }); - await this.storeOdapLog({ + await this.storeLog({ sessionID: sessionID, type: "done-rollback", operation: "create-asset", 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 new file mode 100644 index 0000000000..2ba9be6d17 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-factory-besu-satp-gateway.ts @@ -0,0 +1,20 @@ +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 new file mode 100644 index 0000000000..30010f6ee6 --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-factory-fabric-satp-gateway.ts @@ -0,0 +1,20 @@ +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-odap-hermes/src/main/typescript/gateway/plugin-odap-gateway.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-satp-gateway.ts similarity index 92% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/plugin-odap-gateway.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-satp-gateway.ts index 0165c51183..f2a2773f0d 100644 --- a/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/plugin-odap-gateway.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/plugin-satp-gateway.ts @@ -36,7 +36,7 @@ import { CommitFinalV1Response, TransferCompleteV1Request, TransferInitializationV1Request, - OdapLocalLog, + LocalLog, RecoverV1Message, RecoverUpdateV1Message, RecoverUpdateAckV1Message, @@ -92,43 +92,43 @@ import { ClientRequestEndpointV1 } from "../web-services/client-side/client-requ import { RollbackAckMessageEndpointV1 } from "../web-services/recovery/rollback-ack-message-endpoint"; export enum OdapMessageType { - InitializationRequest = "urn:ietf:odap:msgtype:init-transfer-msg", - InitializationResponse = "urn:ietf:odap:msgtype:init-transfer-ack-msg", - TransferCommenceRequest = "urn:ietf:odap:msgtype:transfer-commence-msg", - TransferCommenceResponse = "urn:ietf:odap:msgtype:transfer-commence-ack-msg", - LockEvidenceRequest = "urn:ietf:odap:msgtype:lock-evidence-req-msg", - LockEvidenceResponse = "urn:ietf:odap:msgtype:lock-evidence-ack-msg", - CommitPreparationRequest = "urn:ietf:odap:msgtype:commit-prepare-msg", - CommitPreparationResponse = "urn:ietf:odap:msgtype:commit-ack-msg", - CommitFinalRequest = "urn:ietf:odap:msgtype:commit-final-msg", - CommitFinalResponse = "urn:ietf:odap:msgtype:commit-final-ack-msg", - TransferCompleteRequest = "urn:ietf:odap:msgtype:commit-transfer-complete-msg", + 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 IPluginOdapGatewayConstructorOptions { +export interface IPluginSatpGatewayConstructorOptions { name: string; dltIDs: string[]; instanceId: string; - keyPair?: IOdapPluginKeyPair; + keyPair?: IKeyPair; backupGatewaysAllowed?: string[]; ipfsPath?: string; clientHelper: ClientGatewayHelper; serverHelper: ServerGatewayHelper; knexConfig?: Knex.Config; } -export interface IOdapPluginKeyPair { +export interface IKeyPair { publicKey: Uint8Array; privateKey: Uint8Array; } -export interface IOdapLogIPFS { +export interface IRemoteLog { key: string; hash: string; signature: string; signerPubKey: string; } -export abstract class PluginOdapGateway +export abstract class PluginSatpGateway implements ICactusPlugin, IPluginWebService { public static readonly CLASS_NAME = "OdapGateway"; @@ -149,12 +149,12 @@ export abstract class PluginOdapGateway private _supportedDltIDs: string[]; private _backupGatewaysAllowed: string[]; - private odapSigner: JsObjectSigner; + private objectSigner: JsObjectSigner; private _clientHelper: ClientGatewayHelper; private _serverHelper: ServerGatewayHelper; - public constructor(options: IPluginOdapGatewayConstructorOptions) { + public constructor(options: IPluginSatpGatewayConstructorOptions) { const fnTag = `${this.className}#constructor()`; Checks.truthy(options, `${fnTag} arg options`); Checks.truthy(options.instanceId, `${fnTag} arg options.instanceId`); @@ -173,14 +173,14 @@ export abstract class PluginOdapGateway const keyPairs = options.keyPair ? options.keyPair : Secp256k1Keys.generateKeyPairsBuffer(); - this._pubKey = PluginOdapGateway.bufArray2HexStr(keyPairs.publicKey); - this._privKey = PluginOdapGateway.bufArray2HexStr(keyPairs.privateKey); + this._pubKey = PluginSatpGateway.bufArray2HexStr(keyPairs.publicKey); + this._privKey = PluginSatpGateway.bufArray2HexStr(keyPairs.privateKey); - const odapSignerOptions: IJsObjectSignerOptions = { + const objectSignerOptions: IJsObjectSignerOptions = { privateKey: this._privKey, logLevel: "debug", }; - this.odapSigner = new JsObjectSigner(odapSignerOptions); + this.objectSigner = new JsObjectSigner(objectSignerOptions); this._clientHelper = options.clientHelper; this._serverHelper = options.serverHelper; @@ -200,7 +200,7 @@ export abstract class PluginOdapGateway } private defineIpfsConnection( - options: IPluginOdapGatewayConstructorOptions, + options: IPluginSatpGatewayConstructorOptions, ): void { const config = new Configuration({ basePath: options.ipfsPath }); const apiClient = new ObjectStoreIpfsApi(config); @@ -208,7 +208,7 @@ export abstract class PluginOdapGateway } public get className(): string { - return PluginOdapGateway.CLASS_NAME; + return PluginSatpGateway.CLASS_NAME; } public getOpenApiSpec(): unknown { @@ -400,7 +400,7 @@ export abstract class PluginOdapGateway } sign(msg: string): Uint8Array { - return this.odapSigner.sign(msg); + return this.objectSigner.sign(msg); } // eslint-disable-next-line @typescript-eslint/no-explicit-any @@ -411,7 +411,7 @@ export abstract class PluginOdapGateway const signature = obj.signature; obj.signature = ""; if ( - !this.odapSigner.verify( + !this.objectSigner.verify( JSON.stringify(obj), sourceSignature, sourcePubkey, @@ -445,7 +445,7 @@ export abstract class PluginOdapGateway throw new Error(`${fnTag}, database is undefined`); } - const logs: OdapLocalLog[] = await this.getDatabaseInstance() + const logs: LocalLog[] = await this.getDatabaseInstance() .select( this.database.raw( "sessionId, key, data, type, operation, MAX(timestamp) as timestamp", @@ -481,13 +481,13 @@ export abstract class PluginOdapGateway } } - async storeInDatabase(odapLocalLog: OdapLocalLog) { + async storeInDatabase(localLog: LocalLog) { const fnTag = `${this.className}#storeInDatabase()`; this.log.info( - `${fnTag}, Storing locally log: ${JSON.stringify(odapLocalLog)}`, + `${fnTag}, Storing locally log: ${JSON.stringify(localLog)}`, ); - await this.getDatabaseInstance().insert(odapLocalLog); + await this.getDatabaseInstance().insert(localLog); } async storeInIPFS(key: string, hash: string) { @@ -495,14 +495,14 @@ export abstract class PluginOdapGateway if (this.ipfsApi == undefined) return; - const ipfsLog: IOdapLogIPFS = { + const ipfsLog: IRemoteLog = { key: key, hash: hash, signature: "", signerPubKey: this.pubKey, }; - ipfsLog.signature = PluginOdapGateway.bufArray2HexStr( + ipfsLog.signature = PluginSatpGateway.bufArray2HexStr( await this.sign(JSON.stringify(ipfsLog)), ); @@ -520,22 +520,22 @@ export abstract class PluginOdapGateway } } - async storeOdapLog(odapLocalLog: OdapLocalLog): Promise { + async storeLog(localLog: LocalLog): Promise { if (this.ipfsApi == undefined) return; - odapLocalLog.key = PluginOdapGateway.getOdapLogKey( - odapLocalLog.sessionID, - odapLocalLog.type, - odapLocalLog.operation, + localLog.key = PluginSatpGateway.getOdapLogKey( + localLog.sessionID, + localLog.type, + localLog.operation, ); - odapLocalLog.timestamp = Date.now().toString(); + localLog.timestamp = Date.now().toString(); - await this.storeInDatabase(odapLocalLog); + 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(odapLocalLog, [ + JSON.stringify(localLog, [ "sessionID", "type", "key", @@ -545,27 +545,27 @@ export abstract class PluginOdapGateway ]), ).toString(); - await this.storeInIPFS(odapLocalLog.key, hash); + await this.storeInIPFS(localLog.key, hash); } - async storeOdapProof(odapLocalLog: OdapLocalLog): Promise { - if (this.ipfsApi == undefined || odapLocalLog.data == undefined) return; + async storeProof(localLog: LocalLog): Promise { + if (this.ipfsApi == undefined || localLog.data == undefined) return; - odapLocalLog.key = PluginOdapGateway.getOdapLogKey( - odapLocalLog.sessionID, - odapLocalLog.type, - odapLocalLog.operation, + localLog.key = PluginSatpGateway.getOdapLogKey( + localLog.sessionID, + localLog.type, + localLog.operation, ); - odapLocalLog.timestamp = Date.now().toString(); + localLog.timestamp = Date.now().toString(); - await this.storeInDatabase(odapLocalLog); + await this.storeInDatabase(localLog); - const hash = SHA256(odapLocalLog.data).toString(); + const hash = SHA256(localLog.data).toString(); - await this.storeInIPFS(odapLocalLog.key, hash); + await this.storeInIPFS(localLog.key, hash); } - async getLogFromDatabase(logKey: string): Promise { + async getLogFromDatabase(logKey: string): Promise { const fnTag = `${this.className}#getLogFromDatabase()`; this.log.info(`${fnTag}, retrieving log with key ${logKey}`); @@ -581,7 +581,7 @@ export abstract class PluginOdapGateway async getLastLogFromDatabase( sessionID: string, - ): Promise { + ): Promise { const fnTag = `${this.className}#getLastLog()`; this.log.info(`${fnTag}, retrieving last log from sessionID ${sessionID}`); @@ -598,11 +598,11 @@ export abstract class PluginOdapGateway async getLogsMoreRecentThanTimestamp( timestamp: string, - ): Promise { + ): Promise { const fnTag = `${this.className}#getLogsMoreRecentThanTimestamp()`; this.log.info(`${fnTag}, retrieving logs more recent than ${timestamp}`); - const logs: OdapLocalLog[] = await this.getDatabaseInstance() + const logs: LocalLog[] = await this.getDatabaseInstance() .where("timestamp", ">", timestamp) .whereNot("type", "like", "%proof%"); @@ -615,7 +615,7 @@ export abstract class PluginOdapGateway return logs; } - async getLogFromIPFS(logKey: string): Promise { + async getLogFromIPFS(logKey: string): Promise { const fnTag = `${this.className}#getOdapLogFromIPFS()`; this.log.info(`Retrieving log with key: <${logKey}>`); @@ -631,7 +631,7 @@ export abstract class PluginOdapGateway throw new Error(`${fnTag}, error when logging to ipfs`); } - const log: IOdapLogIPFS = JSON.parse( + const log: IRemoteLog = JSON.parse( Buffer.from(response.data.value, "base64").toString(), ); @@ -647,11 +647,11 @@ export abstract class PluginOdapGateway } static getOdapAPI(basePath: string): OdapApi { - const odapServerApiConfig = new Configuration({ + const config = new Configuration({ basePath: basePath, }); - return new OdapApi(odapServerApiConfig); + return new OdapApi(config); } async deleteDatabaseEntries(sessionID: string) { diff --git a/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/recovery/recover-success.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover-success.ts similarity index 74% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/recovery/recover-success.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover-success.ts index 935325f8f3..0a5920f6ea 100644 --- a/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/recovery/recover-success.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover-success.ts @@ -1,6 +1,6 @@ import { RecoverSuccessV1Message } from "../../generated/openapi/typescript-axios"; import { LoggerProvider } from "@hyperledger/cactus-common"; -import { PluginOdapGateway } from "../plugin-odap-gateway"; +import { PluginSatpGateway } from "../plugin-satp-gateway"; const log = LoggerProvider.getOrCreate({ level: "INFO", @@ -9,12 +9,12 @@ const log = LoggerProvider.getOrCreate({ export async function sendRecoverSuccessMessage( sessionID: string, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, remote: boolean, ): Promise { - const fnTag = `${odap.className}#sendRecoverSuccessMessage()`; + const fnTag = `${gateway.className}#sendRecoverSuccessMessage()`; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if ( sessionData == undefined || @@ -32,8 +32,8 @@ export async function sendRecoverSuccessMessage( signature: "", }; - const signature = PluginOdapGateway.bufArray2HexStr( - odap.sign(JSON.stringify(recoverSuccessMessage)), + const signature = PluginSatpGateway.bufArray2HexStr( + gateway.sign(JSON.stringify(recoverSuccessMessage)), ); recoverSuccessMessage.signature = signature; @@ -44,10 +44,10 @@ export async function sendRecoverSuccessMessage( return recoverSuccessMessage; } - await odap.makeRequest( + await gateway.makeRequest( sessionID, - PluginOdapGateway.getOdapAPI( - odap.isClientGateway(sessionID) + PluginSatpGateway.getOdapAPI( + gateway.isClientGateway(sessionID) ? sessionData.recipientBasePath : sessionData.sourceBasePath, ).recoverV1Success(recoverSuccessMessage), @@ -57,17 +57,17 @@ export async function sendRecoverSuccessMessage( export async function checkValidRecoverSuccessMessage( response: RecoverSuccessV1Message, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, ): Promise { - const fnTag = `${odap.className}#checkValidRecoverSuccessMessage`; + const fnTag = `${gateway.className}#checkValidRecoverSuccessMessage`; const sessionID = response.sessionID; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if (sessionData == undefined) { throw new Error(`${fnTag}, session data is undefined`); } - const pubKey = odap.isClientGateway(response.sessionID) + const pubKey = gateway.isClientGateway(response.sessionID) ? sessionData.recipientGatewayPubkey : sessionData.sourceGatewayPubkey; @@ -83,7 +83,7 @@ export async function checkValidRecoverSuccessMessage( throw new Error(`${fnTag}, RecoverSuccess message is invalid`); } - if (!odap.verifySignature(response, pubKey)) { + if (!gateway.verifySignature(response, pubKey)) { throw new Error( `${fnTag}, RecoverUpdateAckMessage message signature verification failed`, ); diff --git a/packages/cactus-plugin-odap-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 similarity index 75% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/recovery/recover-update-ack.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover-update-ack.ts index c393fd99c4..ce7a9a06c0 100644 --- a/packages/cactus-plugin-odap-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 @@ -1,6 +1,6 @@ import { RecoverUpdateAckV1Message } from "../../generated/openapi/typescript-axios"; import { LoggerProvider } from "@hyperledger/cactus-common"; -import { PluginOdapGateway } from "../plugin-odap-gateway"; +import { PluginSatpGateway } from "../plugin-satp-gateway"; // import { SHA256 } from "crypto-js"; const log = LoggerProvider.getOrCreate({ @@ -10,12 +10,12 @@ const log = LoggerProvider.getOrCreate({ export async function sendRecoverUpdateAckMessage( sessionID: string, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, remote: boolean, ): Promise { - const fnTag = `${odap.className}#sendRecoverUpdateAckMessage()`; + const fnTag = `${gateway.className}#sendRecoverUpdateAckMessage()`; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if ( sessionData == undefined || @@ -35,8 +35,8 @@ export async function sendRecoverUpdateAckMessage( signature: "", }; - const signature = PluginOdapGateway.bufArray2HexStr( - odap.sign(JSON.stringify(recoverUpdateMessage)), + const signature = PluginSatpGateway.bufArray2HexStr( + gateway.sign(JSON.stringify(recoverUpdateMessage)), ); recoverUpdateMessage.signature = signature; @@ -47,10 +47,10 @@ export async function sendRecoverUpdateAckMessage( return recoverUpdateMessage; } - await odap.makeRequest( + await gateway.makeRequest( sessionID, - PluginOdapGateway.getOdapAPI( - odap.isClientGateway(sessionID) + PluginSatpGateway.getOdapAPI( + gateway.isClientGateway(sessionID) ? sessionData.recipientBasePath : sessionData.sourceBasePath, ).recoverUpdateAckV1Message(recoverUpdateMessage), @@ -60,17 +60,17 @@ export async function sendRecoverUpdateAckMessage( export async function checkValidRecoverUpdateAckMessage( response: RecoverUpdateAckV1Message, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, ): Promise { - const fnTag = `${odap.className}#checkValidRecoverUpdateAckMessage`; + const fnTag = `${gateway.className}#checkValidRecoverUpdateAckMessage`; const sessionID = response.sessionID; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if (sessionData == undefined) { throw new Error(`${fnTag}, session data is undefined`); } - const pubKey = odap.isClientGateway(response.sessionID) + const pubKey = gateway.isClientGateway(response.sessionID) ? sessionData.recipientGatewayPubkey : sessionData.sourceGatewayPubkey; @@ -85,7 +85,7 @@ export async function checkValidRecoverUpdateAckMessage( // check if this is a valid recover update ack message // check valid recovered logs - if (!odap.verifySignature(response, pubKey)) { + if (!gateway.verifySignature(response, pubKey)) { throw new Error( `${fnTag}, RecoverUpdateAckMessage message signature verification failed`, ); diff --git a/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/recovery/recover-update.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover-update.ts similarity index 75% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/recovery/recover-update.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover-update.ts index b438283e32..eb344cda8b 100644 --- a/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/recovery/recover-update.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover-update.ts @@ -1,9 +1,9 @@ import { - OdapLocalLog, + LocalLog, RecoverUpdateV1Message, } from "../../generated/openapi/typescript-axios"; import { LoggerProvider } from "@hyperledger/cactus-common"; -import { PluginOdapGateway } from "../plugin-odap-gateway"; +import { PluginSatpGateway } from "../plugin-satp-gateway"; import { SHA256 } from "crypto-js"; // import { SHA256 } from "crypto-js"; @@ -14,12 +14,12 @@ const log = LoggerProvider.getOrCreate({ export async function sendRecoverUpdateMessage( sessionID: string, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, remote: boolean, ): Promise { - const fnTag = `${odap.className}#sendRecoverUpdateMessage()`; + const fnTag = `${gateway.className}#sendRecoverUpdateMessage()`; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if ( sessionData == undefined || @@ -33,8 +33,8 @@ export async function sendRecoverUpdateMessage( throw new Error(`${fnTag}, session data is not correctly initialized`); } - const recoveredLogs: OdapLocalLog[] = - await odap.getLogsMoreRecentThanTimestamp( + const recoveredLogs: LocalLog[] = + await gateway.getLogsMoreRecentThanTimestamp( sessionData.lastLogEntryTimestamp, ); @@ -44,8 +44,8 @@ export async function sendRecoverUpdateMessage( signature: "", }; - const signature = PluginOdapGateway.bufArray2HexStr( - odap.sign(JSON.stringify(recoverUpdateMessage)), + const signature = PluginSatpGateway.bufArray2HexStr( + gateway.sign(JSON.stringify(recoverUpdateMessage)), ); recoverUpdateMessage.signature = signature; @@ -56,10 +56,10 @@ export async function sendRecoverUpdateMessage( return recoverUpdateMessage; } - await odap.makeRequest( + await gateway.makeRequest( sessionID, - PluginOdapGateway.getOdapAPI( - odap.isClientGateway(sessionID) + PluginSatpGateway.getOdapAPI( + gateway.isClientGateway(sessionID) ? sessionData.recipientBasePath : sessionData.sourceBasePath, ).recoverUpdateV1Message(recoverUpdateMessage), @@ -69,17 +69,17 @@ export async function sendRecoverUpdateMessage( export async function checkValidRecoverUpdateMessage( response: RecoverUpdateV1Message, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, ): Promise { - const fnTag = `${odap.className}#checkValidRecoverUpdateMessage`; + const fnTag = `${gateway.className}#checkValidRecoverUpdateMessage`; const sessionID = response.sessionID; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if (sessionData == undefined) { throw new Error(`${fnTag}, session data is undefined`); } - const pubKey = odap.isClientGateway(response.sessionID) + const pubKey = gateway.isClientGateway(response.sessionID) ? sessionData.recipientGatewayPubkey : sessionData.sourceGatewayPubkey; @@ -93,7 +93,7 @@ export async function checkValidRecoverUpdateMessage( // check if this is a valid recover update message - if (!odap.verifySignature(response, pubKey)) { + if (!gateway.verifySignature(response, pubKey)) { throw new Error( `${fnTag}, RecoverUpdateMessage message signature verification failed`, ); @@ -110,7 +110,7 @@ export async function checkValidRecoverUpdateMessage( log.info(`${fnTag}, received log: ${JSON.stringify(recLog)}`); - const ipfsLog = await odap.getLogFromIPFS(recLog.key); + const ipfsLog = await gateway.getLogFromIPFS(recLog.key); const hash = SHA256(JSON.stringify(recLog)).toString(); @@ -132,13 +132,13 @@ export async function checkValidRecoverUpdateMessage( const data = JSON.parse(recLog.data); // don't override new gateway public keys in case of being a backup gateway - if (odap.isClientGateway(sessionID)) { - data.sourceGatewayPubkey = odap.pubKey; + if (gateway.isClientGateway(sessionID)) { + data.sourceGatewayPubkey = gateway.pubKey; } else { - data.recipientGatewayPubkey = odap.pubKey; + data.recipientGatewayPubkey = gateway.pubKey; } - odap.sessions.set(sessionID, data); + gateway.sessions.set(sessionID, data); } } diff --git a/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/recovery/recover.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover.ts similarity index 82% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/recovery/recover.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover.ts index b32ba0b1d8..1b62b52a32 100644 --- a/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/recovery/recover.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/recover.ts @@ -1,6 +1,6 @@ import { RecoverV1Message } from "../../generated/openapi/typescript-axios"; import { LoggerProvider } from "@hyperledger/cactus-common"; -import { PluginOdapGateway } from "../plugin-odap-gateway"; +import { PluginSatpGateway } from "../plugin-satp-gateway"; const log = LoggerProvider.getOrCreate({ level: "INFO", @@ -9,13 +9,13 @@ const log = LoggerProvider.getOrCreate({ export async function sendRecoverMessage( sessionID: string, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, backup: boolean, remote: boolean, ): Promise { - const fnTag = `${odap.className}#sendRecoverMessage()`; + const fnTag = `${gateway.className}#sendRecoverMessage()`; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if ( sessionData == undefined || @@ -40,8 +40,8 @@ export async function sendRecoverMessage( signature: "", }; - const signature = PluginOdapGateway.bufArray2HexStr( - odap.sign(JSON.stringify(recoverMessage)), + const signature = PluginSatpGateway.bufArray2HexStr( + gateway.sign(JSON.stringify(recoverMessage)), ); recoverMessage.signature = signature; @@ -52,10 +52,10 @@ export async function sendRecoverMessage( return recoverMessage; } - await odap.makeRequest( + await gateway.makeRequest( sessionID, - PluginOdapGateway.getOdapAPI( - odap.isClientGateway(sessionID) + PluginSatpGateway.getOdapAPI( + gateway.isClientGateway(sessionID) ? sessionData.recipientBasePath : sessionData.sourceBasePath, ).recoverV1Message(recoverMessage), @@ -65,19 +65,19 @@ export async function sendRecoverMessage( export async function checkValidRecoverMessage( response: RecoverV1Message, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, ): Promise { - const fnTag = `${odap.className}#checkValidRecoverMessage`; + const fnTag = `${gateway.className}#checkValidRecoverMessage`; const sessionID = response.sessionID; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if (sessionData == undefined) { throw new Error(`${fnTag}, session data is undefined`); } let pubKey = undefined; - if (odap.isClientGateway(response.sessionID)) { + if (gateway.isClientGateway(response.sessionID)) { if ( response.isBackup && sessionData.recipientGatewayPubkey != response.newGatewayPubKey @@ -127,7 +127,7 @@ export async function checkValidRecoverMessage( throw new Error(`${fnTag}, last log entry timestamp is not valid`); } - if (!odap.verifySignature(response, pubKey)) { + if (!gateway.verifySignature(response, pubKey)) { throw new Error( `${fnTag}, RecoverMessage message signature verification failed`, ); @@ -135,7 +135,7 @@ export async function checkValidRecoverMessage( sessionData.lastLogEntryTimestamp = response.lastLogEntryTimestamp; - odap.sessions.set(sessionID, sessionData); + gateway.sessions.set(sessionID, sessionData); log.info(`RecoverMessage passed all checks.`); } diff --git a/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/recovery/rollback-ack.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/rollback-ack.ts similarity index 74% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/recovery/rollback-ack.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/rollback-ack.ts index 6710c5144c..4b4f1683d5 100644 --- a/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/recovery/rollback-ack.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/rollback-ack.ts @@ -1,6 +1,6 @@ import { RollbackAckV1Message } from "../../generated/openapi/typescript-axios"; import { LoggerProvider } from "@hyperledger/cactus-common"; -import { PluginOdapGateway } from "../plugin-odap-gateway"; +import { PluginSatpGateway } from "../plugin-satp-gateway"; // import { SHA256 } from "crypto-js"; const log = LoggerProvider.getOrCreate({ @@ -10,12 +10,12 @@ const log = LoggerProvider.getOrCreate({ export async function sendRollbackAckMessage( sessionID: string, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, remote: boolean, ): Promise { - const fnTag = `${odap.className}#sendRollbackAckMessage()`; + const fnTag = `${gateway.className}#sendRollbackAckMessage()`; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if ( sessionData == undefined || @@ -35,8 +35,8 @@ export async function sendRollbackAckMessage( signature: "", }; - const signature = PluginOdapGateway.bufArray2HexStr( - odap.sign(JSON.stringify(rollbackAckMessage)), + const signature = PluginSatpGateway.bufArray2HexStr( + gateway.sign(JSON.stringify(rollbackAckMessage)), ); rollbackAckMessage.signature = signature; @@ -47,10 +47,10 @@ export async function sendRollbackAckMessage( return rollbackAckMessage; } - await odap.makeRequest( + await gateway.makeRequest( sessionID, - PluginOdapGateway.getOdapAPI( - odap.isClientGateway(sessionID) + PluginSatpGateway.getOdapAPI( + gateway.isClientGateway(sessionID) ? sessionData.recipientBasePath : sessionData.sourceBasePath, ).rollbackAckV1Message(rollbackAckMessage), @@ -60,17 +60,17 @@ export async function sendRollbackAckMessage( export async function checkValidRollbackAckMessage( response: RollbackAckV1Message, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, ): Promise { - const fnTag = `${odap.className}#checkValidRollbackAckMessage`; + const fnTag = `${gateway.className}#checkValidRollbackAckMessage`; const sessionID = response.sessionID; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if (sessionData == undefined) { throw new Error(`${fnTag}, session data is undefined`); } - const pubKey = odap.isClientGateway(response.sessionID) + const pubKey = gateway.isClientGateway(response.sessionID) ? sessionData.recipientGatewayPubkey : sessionData.sourceGatewayPubkey; @@ -82,7 +82,7 @@ export async function checkValidRollbackAckMessage( // throw new Error(`${fnTag}, wrong message type for CommitFinalResponse`); // } - if (!odap.verifySignature(response, pubKey)) { + if (!gateway.verifySignature(response, pubKey)) { throw new Error( `${fnTag}, RollbackAckMessage message signature verification failed`, ); diff --git a/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/recovery/rollback.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/rollback.ts similarity index 75% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/recovery/rollback.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/rollback.ts index 19f1429345..aedc57430a 100644 --- a/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/recovery/rollback.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/recovery/rollback.ts @@ -1,6 +1,6 @@ import { RollbackV1Message } from "../../generated/openapi/typescript-axios"; import { LoggerProvider } from "@hyperledger/cactus-common"; -import { PluginOdapGateway } from "../plugin-odap-gateway"; +import { PluginSatpGateway } from "../plugin-satp-gateway"; // import { SHA256 } from "crypto-js"; const log = LoggerProvider.getOrCreate({ @@ -10,12 +10,12 @@ const log = LoggerProvider.getOrCreate({ export async function sendRollbackMessage( sessionID: string, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, remote: boolean, ): Promise { - const fnTag = `${odap.className}#sendRollbackMessage()`; + const fnTag = `${gateway.className}#sendRollbackMessage()`; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if ( sessionData == undefined || @@ -37,8 +37,8 @@ export async function sendRollbackMessage( signature: "", }; - const signature = PluginOdapGateway.bufArray2HexStr( - odap.sign(JSON.stringify(rollbackMessage)), + const signature = PluginSatpGateway.bufArray2HexStr( + gateway.sign(JSON.stringify(rollbackMessage)), ); rollbackMessage.signature = signature; @@ -49,10 +49,10 @@ export async function sendRollbackMessage( return rollbackMessage; } - await odap.makeRequest( + await gateway.makeRequest( sessionID, - PluginOdapGateway.getOdapAPI( - odap.isClientGateway(sessionID) + PluginSatpGateway.getOdapAPI( + gateway.isClientGateway(sessionID) ? sessionData.recipientBasePath : sessionData.sourceBasePath, ).rollbackV1Message(rollbackMessage), @@ -62,17 +62,17 @@ export async function sendRollbackMessage( export async function checkValidRollbackMessage( response: RollbackV1Message, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, ): Promise { - const fnTag = `${odap.className}#checkValidRollbackMessage`; + const fnTag = `${gateway.className}#checkValidRollbackMessage`; const sessionID = response.sessionID; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if (sessionData == undefined) { throw new Error(`${fnTag}, session data is undefined`); } - const pubKey = odap.isClientGateway(response.sessionID) + const pubKey = gateway.isClientGateway(response.sessionID) ? sessionData.recipientGatewayPubkey : sessionData.sourceGatewayPubkey; @@ -84,7 +84,7 @@ export async function checkValidRollbackMessage( // throw new Error(`${fnTag}, wrong message type for CommitFinalResponse`); // } - if (!odap.verifySignature(response, pubKey)) { + if (!gateway.verifySignature(response, pubKey)) { throw new Error( `${fnTag}, RollbackMessage message signature verification failed`, ); diff --git a/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/server/server-helper.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/server/server-helper.ts similarity index 83% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/server/server-helper.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/server/server-helper.ts index 85870223ca..35f85630d0 100644 --- a/packages/cactus-plugin-odap-hermes/src/main/typescript/gateway/server/server-helper.ts +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/gateway/server/server-helper.ts @@ -14,7 +14,7 @@ import { CommitFinalV1Request, TransferCompleteV1Request, } from "../../public-api"; -import { OdapMessageType, PluginOdapGateway } from "../plugin-odap-gateway"; +import { OdapMessageType, PluginSatpGateway } from "../plugin-satp-gateway"; export class ServerGatewayHelper { public static readonly CLASS_NAME: string = "ServerGatewayHelper"; @@ -36,12 +36,12 @@ export class ServerGatewayHelper { async sendTransferInitializationResponse( sessionID: string, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, remote: boolean, ): Promise { - const fnTag = `${odap.className}#sendTransferInitiationResponse()`; + const fnTag = `${gateway.className}#sendTransferInitiationResponse()`; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if ( sessionData == undefined || sessionData.step == undefined || @@ -63,15 +63,15 @@ export class ServerGatewayHelper { timeStamp: sessionData.initializationRequestMessageRcvTimeStamp, processedTimeStamp: sessionData.initializationRequestMessageProcessedTimeStamp, - serverIdentityPubkey: odap.pubKey, + serverIdentityPubkey: gateway.pubKey, sequenceNumber: sessionData.lastSequenceNumber, signature: "", - backupGatewaysAllowed: odap.backupGatewaysAllowed, + backupGatewaysAllowed: gateway.backupGatewaysAllowed, }; transferInitializationResponse.signature = - PluginOdapGateway.bufArray2HexStr( - odap.sign(JSON.stringify(transferInitializationResponse)), + PluginSatpGateway.bufArray2HexStr( + gateway.sign(JSON.stringify(transferInitializationResponse)), ); sessionData.initializationResponseMessageHash = SHA256( @@ -81,14 +81,14 @@ export class ServerGatewayHelper { sessionData.serverSignatureInitializationResponseMessage = transferInitializationResponse.signature; - await odap.storeOdapLog({ + await gateway.storeLog({ sessionID: sessionID, type: "ack", operation: "validate", data: JSON.stringify(sessionData), }); - odap.sessions.set(sessionID, sessionData); + gateway.sessions.set(sessionID, sessionData); this.log.info(`${fnTag}, sending TransferInitializationResponse...`); @@ -96,9 +96,9 @@ export class ServerGatewayHelper { return transferInitializationResponse; } - await odap.makeRequest( + await gateway.makeRequest( sessionID, - PluginOdapGateway.getOdapAPI( + PluginSatpGateway.getOdapAPI( sessionData.sourceBasePath, ).phase1TransferInitiationResponseV1(transferInitializationResponse), "TransferInitializationResponse", @@ -107,9 +107,9 @@ export class ServerGatewayHelper { async checkValidInitializationRequest( request: TransferInitializationV1Request, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, ): Promise { - const fnTag = `${odap.className}#checkValidInitializationRequest()`; + const fnTag = `${gateway.className}#checkValidInitializationRequest()`; const sessionData: SessionData = {}; const recvTimestamp: string = Date.now().toString(); @@ -119,9 +119,9 @@ export class ServerGatewayHelper { sessionData.step = 2; sessionData.initializationRequestMessageRcvTimeStamp = recvTimestamp; - odap.sessions.set(sessionID, sessionData); + gateway.sessions.set(sessionID, sessionData); - await odap.storeOdapLog({ + await gateway.storeLog({ sessionID: sessionID, type: "exec", operation: "validate", @@ -134,13 +134,13 @@ export class ServerGatewayHelper { ); } - if (!odap.verifySignature(request, request.sourceGatewayPubkey)) { + if (!gateway.verifySignature(request, request.sourceGatewayPubkey)) { throw new Error( `${fnTag}, TransferInitializationRequest message signature verification failed`, ); } - if (!odap.supportedDltIDs.includes(request.sourceGatewayDltSystem)) { + if (!gateway.supportedDltIDs.includes(request.sourceGatewayDltSystem)) { throw new Error( `${fnTag}, source gateway dlt system is not supported by this gateway`, ); @@ -158,7 +158,7 @@ export class ServerGatewayHelper { sessionData.maxTimeout = request.maxTimeout; sessionData.allowedSourceBackupGateways = request.backupGatewaysAllowed; - sessionData.allowedRecipientBackupGateways = odap.backupGatewaysAllowed; + sessionData.allowedRecipientBackupGateways = gateway.backupGatewaysAllowed; sessionData.sourceBasePath = request.sourceBasePath; sessionData.recipientBasePath = request.recipientBasePath; @@ -187,9 +187,9 @@ export class ServerGatewayHelper { sessionData.initializationRequestMessageProcessedTimeStamp = Date.now().toString(); - odap.sessions.set(request.sessionID, sessionData); + gateway.sessions.set(request.sessionID, sessionData); - await odap.storeOdapLog({ + await gateway.storeLog({ sessionID: sessionID, type: "done", operation: "validate", @@ -201,12 +201,12 @@ export class ServerGatewayHelper { async sendTransferCommenceResponse( sessionID: string, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, remote: boolean, ): Promise { - const fnTag = `${odap.className}#sendTransferCommenceResponse()`; + const fnTag = `${gateway.className}#sendTransferCommenceResponse()`; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if ( sessionData == undefined || @@ -233,8 +233,8 @@ export class ServerGatewayHelper { sequenceNumber: ++sessionData.lastSequenceNumber, }; - transferCommenceResponse.signature = PluginOdapGateway.bufArray2HexStr( - odap.sign(JSON.stringify(transferCommenceResponse)), + transferCommenceResponse.signature = PluginSatpGateway.bufArray2HexStr( + gateway.sign(JSON.stringify(transferCommenceResponse)), ); sessionData.transferCommenceMessageResponseHash = SHA256( @@ -244,7 +244,7 @@ export class ServerGatewayHelper { sessionData.serverSignatureTransferCommenceResponseMessage = transferCommenceResponse.signature; - await odap.storeOdapLog({ + await gateway.storeLog({ sessionID: sessionID, type: "ack", operation: "commence", @@ -257,9 +257,9 @@ export class ServerGatewayHelper { return transferCommenceResponse; } - await odap.makeRequest( + await gateway.makeRequest( sessionID, - PluginOdapGateway.getOdapAPI( + PluginSatpGateway.getOdapAPI( sessionData.sourceBasePath, ).phase2TransferCommenceResponseV1(transferCommenceResponse), "TransferCommenceResponse", @@ -268,12 +268,12 @@ export class ServerGatewayHelper { async checkValidtransferCommenceRequest( request: TransferCommenceV1Request, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, ): Promise { - const fnTag = `${odap.className}#checkValidtransferCommenceRequest()`; + const fnTag = `${gateway.className}#checkValidtransferCommenceRequest()`; const sessionID = request.sessionID; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if ( sessionData == undefined || sessionData.lastSequenceNumber == undefined @@ -283,7 +283,7 @@ export class ServerGatewayHelper { ); } - await odap.storeOdapLog({ + await gateway.storeLog({ sessionID: sessionID, type: "exec", operation: "commence", @@ -329,7 +329,7 @@ export class ServerGatewayHelper { throw new Error(`${fnTag}, assetProfile hash not match`); } - if (!odap.verifySignature(request, request.clientIdentityPubkey)) { + if (!gateway.verifySignature(request, request.clientIdentityPubkey)) { throw new Error( `${fnTag}, TransferCommenceRequest message signature verification failed`, ); @@ -345,9 +345,9 @@ export class ServerGatewayHelper { sessionData.originatorPubkey = request.originatorPubkey; sessionData.beneficiaryPubkey = request.beneficiaryPubkey; - odap.sessions.set(request.sessionID, sessionData); + gateway.sessions.set(request.sessionID, sessionData); - await odap.storeOdapLog({ + await gateway.storeLog({ sessionID: sessionID, type: "done", operation: "commence", @@ -355,19 +355,19 @@ export class ServerGatewayHelper { }); sessionData.step = 4; - odap.sessions.set(sessionID, sessionData); + gateway.sessions.set(sessionID, sessionData); this.log.info(`TransferCommenceRequest passed all checks.`); } async sendLockEvidenceResponse( sessionID: string, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, remote: boolean, ): Promise { - const fnTag = `${odap.className}#sendLockEvidenceResponse()`; + const fnTag = `${gateway.className}#sendLockEvidenceResponse()`; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if ( sessionData == undefined || @@ -394,8 +394,8 @@ export class ServerGatewayHelper { sequenceNumber: ++sessionData.lastSequenceNumber, }; - lockEvidenceResponseMessage.signature = PluginOdapGateway.bufArray2HexStr( - await odap.sign(JSON.stringify(lockEvidenceResponseMessage)), + lockEvidenceResponseMessage.signature = PluginSatpGateway.bufArray2HexStr( + await gateway.sign(JSON.stringify(lockEvidenceResponseMessage)), ); sessionData.lockEvidenceResponseMessageHash = SHA256( @@ -405,7 +405,7 @@ export class ServerGatewayHelper { sessionData.serverSignatureLockEvidenceResponseMessage = lockEvidenceResponseMessage.signature; - await odap.storeOdapLog({ + await gateway.storeLog({ sessionID: sessionID, type: "ack", operation: "lock", @@ -418,9 +418,9 @@ export class ServerGatewayHelper { return lockEvidenceResponseMessage; } - await odap.makeRequest( + await gateway.makeRequest( sessionID, - PluginOdapGateway.getOdapAPI( + PluginSatpGateway.getOdapAPI( sessionData.sourceBasePath, ).phase2LockEvidenceResponseV1(lockEvidenceResponseMessage), "LockEvidenceResponse", @@ -429,12 +429,12 @@ export class ServerGatewayHelper { async checkValidLockEvidenceRequest( request: LockEvidenceV1Request, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, ): Promise { - const fnTag = `${odap.className}#checkValidLockEvidenceRequest()`; + const fnTag = `${gateway.className}#checkValidLockEvidenceRequest()`; const sessionID = request.sessionID; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if ( sessionData == undefined || sessionData.step == undefined || @@ -445,7 +445,7 @@ export class ServerGatewayHelper { ); } - await odap.storeOdapLog({ + await gateway.storeLog({ sessionID: sessionID, type: "exec", operation: "lock", @@ -490,15 +490,15 @@ export class ServerGatewayHelper { throw new Error(`${fnTag}, invalid or expired lock evidence claim`); } - if (!odap.verifySignature(request, request.clientIdentityPubkey)) { + if (!gateway.verifySignature(request, request.clientIdentityPubkey)) { throw new Error( `${fnTag}, LockEvidenceRequest message signature verification failed`, ); } const claimHash = SHA256(request.lockEvidenceClaim).toString(); - const retrievedClaim = await odap.getLogFromIPFS( - PluginOdapGateway.getOdapLogKey(sessionID, "proof", "lock"), + const retrievedClaim = await gateway.getLogFromIPFS( + PluginSatpGateway.getOdapLogKey(sessionID, "proof", "lock"), ); if (claimHash != retrievedClaim.hash) { @@ -507,7 +507,7 @@ export class ServerGatewayHelper { ); } - if (!odap.verifySignature(retrievedClaim, request.clientIdentityPubkey)) { + if (!gateway.verifySignature(retrievedClaim, request.clientIdentityPubkey)) { throw new Error( `${fnTag}, LockEvidence Claim message signature verification failed`, ); @@ -521,9 +521,9 @@ export class ServerGatewayHelper { sessionData.lockEvidenceClaim = request.lockEvidenceClaim; - odap.sessions.set(request.sessionID, sessionData); + gateway.sessions.set(request.sessionID, sessionData); - await odap.storeOdapLog({ + await gateway.storeLog({ sessionID: sessionID, type: "done", operation: "lock", @@ -531,19 +531,19 @@ export class ServerGatewayHelper { }); sessionData.step = 6; - odap.sessions.set(sessionID, sessionData); + gateway.sessions.set(sessionID, sessionData); this.log.info(`LockEvidenceRequest passed all checks.`); } async sendCommitPreparationResponse( sessionID: string, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, remote: boolean, ): Promise { - const fnTag = `${odap.className}#sendCommitPrepareResponse()`; + const fnTag = `${gateway.className}#sendCommitPrepareResponse()`; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if ( sessionData == undefined || @@ -570,8 +570,8 @@ export class ServerGatewayHelper { }; commitPreparationResponseMessage.signature = - PluginOdapGateway.bufArray2HexStr( - await odap.sign(JSON.stringify(commitPreparationResponseMessage)), + PluginSatpGateway.bufArray2HexStr( + await gateway.sign(JSON.stringify(commitPreparationResponseMessage)), ); sessionData.commitPrepareResponseMessageHash = SHA256( @@ -581,7 +581,7 @@ export class ServerGatewayHelper { sessionData.serverSignatureCommitPreparationResponseMessage = commitPreparationResponseMessage.signature; - await odap.storeOdapLog({ + await gateway.storeLog({ sessionID: sessionID, type: "ack", operation: "prepare", @@ -594,9 +594,9 @@ export class ServerGatewayHelper { return commitPreparationResponseMessage; } - await odap.makeRequest( + await gateway.makeRequest( sessionID, - PluginOdapGateway.getOdapAPI( + PluginSatpGateway.getOdapAPI( sessionData.sourceBasePath, ).phase3CommitPreparationResponseV1(commitPreparationResponseMessage), "CommitPreparationResponse", @@ -605,12 +605,12 @@ export class ServerGatewayHelper { async checkValidCommitPreparationRequest( request: CommitPreparationV1Request, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, ): Promise { - const fnTag = `${odap.className}#checkValidCommitPrepareRequest()`; + const fnTag = `${gateway.className}#checkValidCommitPrepareRequest()`; const sessionID = request.sessionID; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if ( sessionData == undefined || sessionData.step == undefined || @@ -653,14 +653,14 @@ export class ServerGatewayHelper { ); } - await odap.storeOdapLog({ + await gateway.storeLog({ sessionID: sessionID, type: "exec", operation: "prepare", data: JSON.stringify(sessionData), }); - if (!odap.verifySignature(request, request.clientIdentityPubkey)) { + if (!gateway.verifySignature(request, request.clientIdentityPubkey)) { throw new Error( `${fnTag}, CommitPreparationRequest message signature verification failed`, ); @@ -673,9 +673,9 @@ export class ServerGatewayHelper { sessionData.clientSignatureCommitPreparationRequestMessage = request.signature; - odap.sessions.set(request.sessionID, sessionData); + gateway.sessions.set(request.sessionID, sessionData); - await odap.storeOdapLog({ + await gateway.storeLog({ sessionID: sessionID, type: "done", operation: "prepare", @@ -683,19 +683,19 @@ export class ServerGatewayHelper { }); sessionData.step = 8; - odap.sessions.set(sessionID, sessionData); + gateway.sessions.set(sessionID, sessionData); this.log.info(`CommitPreparationRequest passed all checks.`); } async sendCommitFinalResponse( sessionID: string, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, remote: boolean, ): Promise { - const fnTag = `${odap.className}#sendCommitFinalResponse()`; + const fnTag = `${gateway.className}#sendCommitFinalResponse()`; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if ( sessionData == undefined || sessionData.step == undefined || @@ -722,8 +722,8 @@ export class ServerGatewayHelper { sequenceNumber: ++sessionData.lastSequenceNumber, }; - commitFinalResponseMessage.signature = PluginOdapGateway.bufArray2HexStr( - await odap.sign(JSON.stringify(commitFinalResponseMessage)), + commitFinalResponseMessage.signature = PluginSatpGateway.bufArray2HexStr( + await gateway.sign(JSON.stringify(commitFinalResponseMessage)), ); sessionData.commitFinalResponseMessageHash = SHA256( @@ -733,14 +733,14 @@ export class ServerGatewayHelper { sessionData.serverSignatureCommitFinalResponseMessage = commitFinalResponseMessage.signature; - await odap.storeOdapLog({ + await gateway.storeLog({ sessionID: sessionID, type: "ack", operation: "final", data: JSON.stringify(sessionData), }); - odap.sessions.set(sessionID, sessionData); + gateway.sessions.set(sessionID, sessionData); this.log.info(`${fnTag}, sending CommitFinalResponse...`); @@ -748,9 +748,9 @@ export class ServerGatewayHelper { return commitFinalResponseMessage; } - await odap.makeRequest( + await gateway.makeRequest( sessionID, - PluginOdapGateway.getOdapAPI( + PluginSatpGateway.getOdapAPI( sessionData.sourceBasePath, ).phase3CommitFinalResponseV1(commitFinalResponseMessage), "CommitFinalResponse", @@ -759,12 +759,12 @@ export class ServerGatewayHelper { async checkValidCommitFinalRequest( request: CommitFinalV1Request, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, ): Promise { - const fnTag = `${odap.className}#checkValidCommitFinalRequest()`; + const fnTag = `${gateway.className}#checkValidCommitFinalRequest()`; const sessionID = request.sessionID; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if ( sessionData == undefined || sessionData.id == undefined || @@ -776,7 +776,7 @@ export class ServerGatewayHelper { ); } - await odap.storeOdapLog({ + await gateway.storeLog({ sessionID: sessionID, type: "exec", operation: "final", @@ -814,7 +814,7 @@ export class ServerGatewayHelper { throw new Error(`${fnTag}, previous message hash does not match`); } - if (!odap.verifySignature(request, request.clientIdentityPubkey)) { + if (!gateway.verifySignature(request, request.clientIdentityPubkey)) { throw new Error( `${fnTag}, CommitFinalRequest message signature verification failed`, ); @@ -822,8 +822,8 @@ export class ServerGatewayHelper { // We need to check somewhere if this phase is completed within the asset-lock duration. const claimHash = SHA256(request.commitFinalClaim).toString(); - const retrievedClaim = await odap.getLogFromIPFS( - PluginOdapGateway.getOdapLogKey(sessionID, "proof", "delete"), + const retrievedClaim = await gateway.getLogFromIPFS( + PluginSatpGateway.getOdapLogKey(sessionID, "proof", "delete"), ); if (claimHash != retrievedClaim.hash) { @@ -832,7 +832,7 @@ export class ServerGatewayHelper { ); } - if (!odap.verifySignature(retrievedClaim, request.clientIdentityPubkey)) { + if (!gateway.verifySignature(retrievedClaim, request.clientIdentityPubkey)) { throw new Error( `${fnTag}, Commit Final Claim signature verification failed`, ); @@ -846,8 +846,8 @@ export class ServerGatewayHelper { sessionData.clientSignatureCommitFinalRequestMessage = request.signature; - odap.sessions.set(request.sessionID, sessionData); - await odap.storeOdapLog({ + gateway.sessions.set(request.sessionID, sessionData); + await gateway.storeLog({ sessionID: sessionID, type: "done", operation: "final", @@ -855,19 +855,19 @@ export class ServerGatewayHelper { }); sessionData.step = 10; - odap.sessions.set(sessionID, sessionData); + gateway.sessions.set(sessionID, sessionData); this.log.info(`CommitFinalRequest passed all checks.`); } async checkValidTransferCompleteRequest( request: TransferCompleteV1Request, - odap: PluginOdapGateway, + gateway: PluginSatpGateway, ): Promise { - const fnTag = `${odap.className}#checkValidTransferCompleteRequest()`; + const fnTag = `${gateway.className}#checkValidTransferCompleteRequest()`; const sessionID = request.sessionID; - const sessionData = odap.sessions.get(sessionID); + const sessionData = gateway.sessions.get(sessionID); if ( sessionData == undefined || sessionData.step == undefined || @@ -878,7 +878,7 @@ export class ServerGatewayHelper { ); } - await odap.storeOdapLog({ + await gateway.storeLog({ sessionID: sessionID, type: "exec", operation: "complete", @@ -903,7 +903,7 @@ export class ServerGatewayHelper { throw new Error(`${fnTag}, previous message hash not match`); } - if (!odap.verifySignature(request, request.clientIdentityPubkey)) { + if (!gateway.verifySignature(request, request.clientIdentityPubkey)) { throw new Error( `${fnTag}, TransferCompleteRequest message signature verification failed`, ); @@ -915,9 +915,9 @@ export class ServerGatewayHelper { sessionData.clientSignatureTransferCompleteMessage = request.signature; - odap.sessions.set(request.sessionID, sessionData); + gateway.sessions.set(request.sessionID, sessionData); - await odap.storeOdapLog({ + await gateway.storeLog({ sessionID: sessionID, type: "done", operation: "complete", diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES rename to packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/FILES diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION rename to packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/.openapi-generator/VERSION diff --git a/packages/cactus-plugin-odap-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 similarity index 98% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/generated/openapi/typescript-axios/api.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/api.ts index 46221d5b65..b01775c75b 100644 --- a/packages/cactus-plugin-odap-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 @@ -562,6 +562,49 @@ export interface 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 @@ -696,49 +739,6 @@ export interface LockEvidenceV1Response { */ 'sequenceNumber': number; } -/** - * - * @export - * @interface OdapLocalLog - */ -export interface OdapLocalLog { - /** - * - * @type {string} - * @memberof OdapLocalLog - */ - 'key'?: string; - /** - * - * @type {string} - * @memberof OdapLocalLog - */ - 'sessionID': string; - /** - * - * @type {string} - * @memberof OdapLocalLog - */ - 'data'?: string; - /** - * - * @type {string} - * @memberof OdapLocalLog - */ - 'type': string; - /** - * - * @type {string} - * @memberof OdapLocalLog - */ - 'operation': string; - /** - * - * @type {string} - * @memberof OdapLocalLog - */ - 'timestamp'?: string; -} /** * * @export @@ -950,10 +950,10 @@ export interface RecoverUpdateV1Message { 'sessionID': string; /** * - * @type {Array} + * @type {Array} * @memberof RecoverUpdateV1Message */ - 'recoveredLogs': Array; + 'recoveredLogs': Array; /** * * @type {string} @@ -1976,7 +1976,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @throws {RequiredError} */ clientRequestV1: async (clientV1Request?: ClientV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest`; + 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; @@ -2009,7 +2009,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @throws {RequiredError} */ phase1TransferInitiationRequestV1: async (transferInitializationV1Request?: TransferInitializationV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase1/transferinitiationrequest`; + 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; @@ -2042,7 +2042,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @throws {RequiredError} */ phase1TransferInitiationResponseV1: async (transferInitializationV1Response?: TransferInitializationV1Response, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase1/transferinitiationresponse`; + 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; @@ -2075,7 +2075,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @throws {RequiredError} */ phase2LockEvidenceRequestV1: async (lockEvidenceV1Request?: LockEvidenceV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/lockevidencerequest`; + 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; @@ -2108,7 +2108,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @throws {RequiredError} */ phase2LockEvidenceResponseV1: async (lockEvidenceV1Response?: LockEvidenceV1Response, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/lockevidenceresponse`; + 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; @@ -2141,7 +2141,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @throws {RequiredError} */ phase2TransferCommenceRequestV1: async (transferCommenceV1Request?: TransferCommenceV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/transfercommencerequest`; + 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; @@ -2174,7 +2174,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @throws {RequiredError} */ phase2TransferCommenceResponseV1: async (transferCommenceV1Response?: TransferCommenceV1Response, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/transfercommenceresponse`; + 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; @@ -2207,7 +2207,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @throws {RequiredError} */ phase3CommitFinalRequestV1: async (commitFinalV1Request?: CommitFinalV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitfinalrequest`; + 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; @@ -2240,7 +2240,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @throws {RequiredError} */ phase3CommitFinalResponseV1: async (commitFinalV1Response?: CommitFinalV1Response, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitfinalresponse`; + 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; @@ -2273,7 +2273,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @throws {RequiredError} */ phase3CommitPreparationRequestV1: async (commitPreparationV1Request?: CommitPreparationV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitpreparationrequest`; + 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; @@ -2306,7 +2306,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @throws {RequiredError} */ phase3CommitPreparationResponseV1: async (commitPreparationV1Response?: CommitPreparationV1Response, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitpreparationresponse`; + 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; @@ -2339,7 +2339,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @throws {RequiredError} */ phase3TransferCompleteRequestV1: async (transferCompleteV1Request?: TransferCompleteV1Request, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/transfercompleterequest`; + 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; @@ -2372,7 +2372,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @throws {RequiredError} */ recoverUpdateAckV1Message: async (recoverUpdateAckV1Message?: RecoverUpdateAckV1Message, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-odap-hermes/recoverupdateackmessage`; + 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; @@ -2405,7 +2405,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @throws {RequiredError} */ recoverUpdateV1Message: async (recoverUpdateV1Message?: RecoverUpdateV1Message, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-odap-hermes/recoverupdatemessage`; + 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; @@ -2438,7 +2438,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @throws {RequiredError} */ recoverV1Message: async (recoverV1Message?: RecoverV1Message, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-odap-hermes/recovermessage`; + 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; @@ -2471,7 +2471,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @throws {RequiredError} */ recoverV1Success: async (recoverSuccessV1Message?: RecoverSuccessV1Message, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-odap-hermes/recoversuccessmessage`; + 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; @@ -2504,7 +2504,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @throws {RequiredError} */ rollbackAckV1Message: async (rollbackAckV1Message?: RollbackAckV1Message, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-odap-hermes/rollbackackmessage`; + 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; @@ -2537,7 +2537,7 @@ export const DefaultApiAxiosParamCreator = function (configuration?: Configurati * @throws {RequiredError} */ rollbackV1Message: async (rollbackV1Message?: RollbackV1Message, options: AxiosRequestConfig = {}): Promise => { - const localVarPath = `/api/v1/@hyperledger/cactus-plugin-odap-hermes/rollbackmessage`; + 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; diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/generated/openapi/typescript-axios/base.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/base.ts diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/generated/openapi/typescript-axios/common.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/common.ts diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/generated/openapi/typescript-axios/configuration.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/configuration.ts diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/generated/openapi/typescript-axios/index.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/generated/openapi/typescript-axios/index.ts diff --git a/packages/cactus-plugin-odap-hermes/src/main/typescript/index.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/index.ts similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/index.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/index.ts diff --git a/packages/cactus-plugin-odap-hermes/src/main/typescript/index.web.ts b/packages/cactus-plugin-satp-hermes/src/main/typescript/index.web.ts similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/index.web.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/index.web.ts 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 new file mode 100644 index 0000000000..aa01ca344f --- /dev/null +++ b/packages/cactus-plugin-satp-hermes/src/main/typescript/public-api.ts @@ -0,0 +1,27 @@ +export * from "./generated/openapi/typescript-axios/index"; + +export { + IPluginSatpGatewayConstructorOptions, + PluginSatpGateway, + OdapMessageType, + 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-odap-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 similarity index 89% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/web-services/client-side/client-request-endpoint.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/client-request-endpoint.ts index e46deb0ffa..e1beb1e6b1 100644 --- a/packages/cactus-plugin-odap-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 @@ -15,13 +15,13 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginOdapGateway } from "../../gateway/plugin-odap-gateway"; +import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface IClientRequestEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginOdapGateway; + gateway: PluginSatpGateway; } export class ClientRequestEndpointV1 implements IWebServiceEndpoint { @@ -45,19 +45,19 @@ export class ClientRequestEndpointV1 implements IWebServiceEndpoint { public getPath(): string { const apiPath = - OAS.paths["/api/v1/@hyperledger/cactus-plugin-odap-hermes/clientrequest"]; + 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-odap-hermes/clientrequest"]; + 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-odap-hermes/clientrequest" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/clientrequest" ].post.operationId; } diff --git a/packages/cactus-plugin-odap-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 similarity index 90% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/web-services/client-side/commit-final-response-endpoint.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-final-response-endpoint.ts index 924249cde5..c68f4864bd 100644 --- a/packages/cactus-plugin-odap-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 @@ -15,13 +15,13 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginOdapGateway } from "../../gateway/plugin-odap-gateway"; +import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface ICommitFinalResponseEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginOdapGateway; + gateway: PluginSatpGateway; } export class CommitFinalResponseEndpointV1 implements IWebServiceEndpoint { @@ -46,7 +46,7 @@ export class CommitFinalResponseEndpointV1 implements IWebServiceEndpoint { public getPath(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitfinalresponse" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse" ]; return apiPath.post["x-hyperledger-cacti"].http.path; } @@ -54,14 +54,14 @@ export class CommitFinalResponseEndpointV1 implements IWebServiceEndpoint { public getVerbLowerCase(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitfinalresponse" + "/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-odap-hermes/phase3/commitfinalresponse" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalresponse" ].post.operationId; } diff --git a/packages/cactus-plugin-odap-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 similarity index 90% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/web-services/client-side/commit-prepare-response-endpoint.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/commit-prepare-response-endpoint.ts index ca5131ed63..f7d9f0fa24 100644 --- a/packages/cactus-plugin-odap-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 @@ -15,13 +15,13 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginOdapGateway } from "../../gateway/plugin-odap-gateway"; +import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface ICommitPreparationResponseEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginOdapGateway; + gateway: PluginSatpGateway; } export class CommitPreparationResponseEndpointV1 @@ -50,7 +50,7 @@ export class CommitPreparationResponseEndpointV1 public getPath(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitpreparationresponse" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse" ]; return apiPath.post["x-hyperledger-cacti"].http.path; } @@ -58,14 +58,14 @@ export class CommitPreparationResponseEndpointV1 public getVerbLowerCase(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitpreparationresponse" + "/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-odap-hermes/phase3/commitpreparationresponse" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationresponse" ].post.operationId; } diff --git a/packages/cactus-plugin-odap-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 similarity index 90% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/web-services/client-side/lock-evidence-response-endpoint.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/lock-evidence-response-endpoint.ts index 4b8a779087..b59a2db14b 100644 --- a/packages/cactus-plugin-odap-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 @@ -15,12 +15,12 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginOdapGateway } from "../../gateway/plugin-odap-gateway"; +import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface ILockEvidenceResponseEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginOdapGateway; + gateway: PluginSatpGateway; } export class LockEvidenceResponseEndpointV1 implements IWebServiceEndpoint { @@ -49,7 +49,7 @@ export class LockEvidenceResponseEndpointV1 implements IWebServiceEndpoint { public getPath(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/lockevidenceresponse" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse" ]; return apiPath.post["x-hyperledger-cacti"].http.path; } @@ -57,14 +57,14 @@ export class LockEvidenceResponseEndpointV1 implements IWebServiceEndpoint { public getVerbLowerCase(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/lockevidenceresponse" + "/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-odap-hermes/phase2/lockevidenceresponse" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidenceresponse" ].post.operationId; } diff --git a/packages/cactus-plugin-odap-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 similarity index 90% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/web-services/client-side/transfer-commence-response-endpoint.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-commence-response-endpoint.ts index d07dd307a1..4e0ab33676 100644 --- a/packages/cactus-plugin-odap-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 @@ -15,12 +15,12 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginOdapGateway } from "../../gateway/plugin-odap-gateway"; +import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface ITransferCommenceResponseEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginOdapGateway; + gateway: PluginSatpGateway; } export class TransferCommenceResponseEndpointV1 implements IWebServiceEndpoint { @@ -47,7 +47,7 @@ export class TransferCommenceResponseEndpointV1 implements IWebServiceEndpoint { public getPath(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/transfercommenceresponse" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse" ]; return apiPath.post["x-hyperledger-cacti"].http.path; } @@ -55,14 +55,14 @@ export class TransferCommenceResponseEndpointV1 implements IWebServiceEndpoint { public getVerbLowerCase(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/transfercommenceresponse" + "/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-odap-hermes/phase2/transfercommenceresponse" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommenceresponse" ].post.operationId; } diff --git a/packages/cactus-plugin-odap-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 similarity index 90% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/web-services/client-side/transfer-initiation-response-endpoint.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/client-side/transfer-initiation-response-endpoint.ts index 00531b186b..b5155591de 100644 --- a/packages/cactus-plugin-odap-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 @@ -15,12 +15,12 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginOdapGateway } from "../../gateway/plugin-odap-gateway"; +import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface ITransferInitiationResponseEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginOdapGateway; + gateway: PluginSatpGateway; } export class TransferInitiationResponseEndpointV1 @@ -49,7 +49,7 @@ export class TransferInitiationResponseEndpointV1 public getPath(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase1/transferinitiationresponse" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse" ]; return apiPath.post["x-hyperledger-cacti"].http.path; } @@ -57,14 +57,14 @@ export class TransferInitiationResponseEndpointV1 public getVerbLowerCase(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase1/transferinitiationresponse" + "/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-odap-hermes/phase1/transferinitiationresponse" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationresponse" ].post.operationId; } diff --git a/packages/cactus-plugin-odap-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 similarity index 90% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/web-services/recovery/recover-message-endpoint.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-message-endpoint.ts index 4852761a1c..39b167e403 100644 --- a/packages/cactus-plugin-odap-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 @@ -15,13 +15,13 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginOdapGateway } from "../../gateway/plugin-odap-gateway"; +import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface IRecoverMessageEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginOdapGateway; + gateway: PluginSatpGateway; } export class RecoverMessageEndpointV1 implements IWebServiceEndpoint { @@ -46,7 +46,7 @@ export class RecoverMessageEndpointV1 implements IWebServiceEndpoint { public getPath(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/recovermessage" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage" ]; return apiPath.post["x-hyperledger-cacti"].http.path; } @@ -54,14 +54,14 @@ export class RecoverMessageEndpointV1 implements IWebServiceEndpoint { public getVerbLowerCase(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/recovermessage" + "/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-odap-hermes/recovermessage" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recovermessage" ].post.operationId; } diff --git a/packages/cactus-plugin-odap-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 similarity index 90% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/web-services/recovery/recover-success-message-endpoint.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-success-message-endpoint.ts index daa6a0e367..9ce43e466a 100644 --- a/packages/cactus-plugin-odap-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 @@ -15,13 +15,13 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginOdapGateway } from "../../gateway/plugin-odap-gateway"; +import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface IRecoverSuccessMessageEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginOdapGateway; + gateway: PluginSatpGateway; } export class RecoverSuccessMessageEndpointV1 implements IWebServiceEndpoint { @@ -46,7 +46,7 @@ export class RecoverSuccessMessageEndpointV1 implements IWebServiceEndpoint { public getPath(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/recoversuccessmessage" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage" ]; return apiPath.post["x-hyperledger-cacti"].http.path; } @@ -54,14 +54,14 @@ export class RecoverSuccessMessageEndpointV1 implements IWebServiceEndpoint { public getVerbLowerCase(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/recoversuccessmessage" + "/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-odap-hermes/recoversuccessmessage" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoversuccessmessage" ].post.operationId; } diff --git a/packages/cactus-plugin-odap-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 similarity index 90% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/web-services/recovery/recover-update-ack-message-endpoint.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-ack-message-endpoint.ts index c0c81d887d..a9808d4922 100644 --- a/packages/cactus-plugin-odap-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 @@ -15,13 +15,13 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginOdapGateway } from "../../gateway/plugin-odap-gateway"; +import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface IRecoverUpdateAckMessageEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginOdapGateway; + gateway: PluginSatpGateway; } export class RecoverUpdateAckMessageEndpointV1 implements IWebServiceEndpoint { @@ -48,7 +48,7 @@ export class RecoverUpdateAckMessageEndpointV1 implements IWebServiceEndpoint { public getPath(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/recoverupdateackmessage" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage" ]; return apiPath.post["x-hyperledger-cacti"].http.path; } @@ -56,14 +56,14 @@ export class RecoverUpdateAckMessageEndpointV1 implements IWebServiceEndpoint { public getVerbLowerCase(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/recoverupdateackmessage" + "/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-odap-hermes/recoverupdateackmessage" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdateackmessage" ].post.operationId; } diff --git a/packages/cactus-plugin-odap-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 similarity index 90% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/web-services/recovery/recover-update-message-endpoint.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/recover-update-message-endpoint.ts index 8d0b1c047c..f10cff1b9f 100644 --- a/packages/cactus-plugin-odap-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 @@ -15,13 +15,13 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginOdapGateway } from "../../gateway/plugin-odap-gateway"; +import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface IRecoverUpdateMessageEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginOdapGateway; + gateway: PluginSatpGateway; } export class RecoverUpdateMessageEndpointV1 implements IWebServiceEndpoint { @@ -46,7 +46,7 @@ export class RecoverUpdateMessageEndpointV1 implements IWebServiceEndpoint { public getPath(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/recoverupdatemessage" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage" ]; return apiPath.post["x-hyperledger-cacti"].http.path; } @@ -54,14 +54,14 @@ export class RecoverUpdateMessageEndpointV1 implements IWebServiceEndpoint { public getVerbLowerCase(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/recoverupdatemessage" + "/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-odap-hermes/recoverupdatemessage" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/recoverupdatemessage" ].post.operationId; } diff --git a/packages/cactus-plugin-odap-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 similarity index 90% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/web-services/recovery/rollback-ack-message-endpoint.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-ack-message-endpoint.ts index 369eaf38c1..2857f12b5b 100644 --- a/packages/cactus-plugin-odap-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 @@ -15,13 +15,13 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginOdapGateway } from "../../gateway/plugin-odap-gateway"; +import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface IRollbackAckMessageEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginOdapGateway; + gateway: PluginSatpGateway; } export class RollbackAckMessageEndpointV1 implements IWebServiceEndpoint { @@ -46,7 +46,7 @@ export class RollbackAckMessageEndpointV1 implements IWebServiceEndpoint { public getPath(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/rollbackackmessage" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage" ]; return apiPath.post["x-hyperledger-cacti"].http.path; } @@ -54,14 +54,14 @@ export class RollbackAckMessageEndpointV1 implements IWebServiceEndpoint { public getVerbLowerCase(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/rollbackackmessage" + "/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-odap-hermes/rollbackackmessage" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackackmessage" ].post.operationId; } diff --git a/packages/cactus-plugin-odap-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 similarity index 90% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/web-services/recovery/rollback-message-endpoint.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/recovery/rollback-message-endpoint.ts index 9220f83e46..3e09838d58 100644 --- a/packages/cactus-plugin-odap-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 @@ -15,13 +15,13 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginOdapGateway } from "../../gateway/plugin-odap-gateway"; +import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface IRollbackMessageEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginOdapGateway; + gateway: PluginSatpGateway; } export class RollbackMessageEndpointV1 implements IWebServiceEndpoint { @@ -46,7 +46,7 @@ export class RollbackMessageEndpointV1 implements IWebServiceEndpoint { public getPath(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/rollbackmessage" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage" ]; return apiPath.post["x-hyperledger-cacti"].http.path; } @@ -54,14 +54,14 @@ export class RollbackMessageEndpointV1 implements IWebServiceEndpoint { public getVerbLowerCase(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/rollbackmessage" + "/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-odap-hermes/rollbackmessage" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/rollbackmessage" ].post.operationId; } diff --git a/packages/cactus-plugin-odap-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 similarity index 90% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/web-services/server-side/commit-final-request-endpoint.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commit-final-request-endpoint.ts index 39ece8217d..cdf2004e8d 100644 --- a/packages/cactus-plugin-odap-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 @@ -15,12 +15,12 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginOdapGateway } from "../../gateway/plugin-odap-gateway"; +import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface ICommitFinalRequestEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginOdapGateway; + gateway: PluginSatpGateway; } export class CommitFinalRequestEndpointV1 implements IWebServiceEndpoint { @@ -45,7 +45,7 @@ export class CommitFinalRequestEndpointV1 implements IWebServiceEndpoint { public getPath(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitfinalrequest" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest" ]; return apiPath.post["x-hyperledger-cacti"].http.path; } @@ -53,14 +53,14 @@ export class CommitFinalRequestEndpointV1 implements IWebServiceEndpoint { public getVerbLowerCase(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitfinalrequest" + "/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-odap-hermes/phase3/commitfinalrequest" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitfinalrequest" ].post.operationId; } diff --git a/packages/cactus-plugin-odap-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 similarity index 90% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/web-services/server-side/commite-prepare-request-endpoint.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/commite-prepare-request-endpoint.ts index 32aedbd40c..4c87695844 100644 --- a/packages/cactus-plugin-odap-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 @@ -15,12 +15,12 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginOdapGateway } from "../../gateway/plugin-odap-gateway"; +import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface ICommitPreparationRequestEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginOdapGateway; + gateway: PluginSatpGateway; } export class CommitPreparationRequestEndpointV1 implements IWebServiceEndpoint { @@ -47,7 +47,7 @@ export class CommitPreparationRequestEndpointV1 implements IWebServiceEndpoint { public getPath(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitpreparationrequest" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest" ]; return apiPath.post["x-hyperledger-cacti"].http.path; } @@ -55,14 +55,14 @@ export class CommitPreparationRequestEndpointV1 implements IWebServiceEndpoint { public getVerbLowerCase(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/commitpreparationrequest" + "/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-odap-hermes/phase3/commitpreparationrequest" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/commitpreparationrequest" ].post.operationId; } diff --git a/packages/cactus-plugin-odap-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 similarity index 90% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/web-services/server-side/lock-evidence-request-endpoint.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/lock-evidence-request-endpoint.ts index a5296fe5fb..8265526059 100644 --- a/packages/cactus-plugin-odap-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 @@ -15,12 +15,12 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginOdapGateway } from "../../gateway/plugin-odap-gateway"; +import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface ILockEvidenceRequestEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginOdapGateway; + gateway: PluginSatpGateway; } export class LockEvidenceRequestEndpointV1 implements IWebServiceEndpoint { @@ -49,7 +49,7 @@ export class LockEvidenceRequestEndpointV1 implements IWebServiceEndpoint { public getPath(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/lockevidencerequest" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest" ]; return apiPath.post["x-hyperledger-cacti"].http.path; } @@ -57,14 +57,14 @@ export class LockEvidenceRequestEndpointV1 implements IWebServiceEndpoint { public getVerbLowerCase(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/lockevidencerequest" + "/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-odap-hermes/phase2/lockevidencerequest" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/lockevidencerequest" ].post.operationId; } diff --git a/packages/cactus-plugin-odap-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 similarity index 90% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/web-services/server-side/transfer-commence-request-endpoint.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-commence-request-endpoint.ts index 7d72deb39c..8853a65632 100644 --- a/packages/cactus-plugin-odap-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 @@ -15,12 +15,12 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginOdapGateway } from "../../gateway/plugin-odap-gateway"; +import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface ITransferCommenceRequestEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginOdapGateway; + gateway: PluginSatpGateway; } export class TransferCommenceRequestEndpointV1 implements IWebServiceEndpoint { @@ -47,7 +47,7 @@ export class TransferCommenceRequestEndpointV1 implements IWebServiceEndpoint { public getPath(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/transfercommencerequest" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest" ]; return apiPath.post["x-hyperledger-cacti"].http.path; } @@ -55,14 +55,14 @@ export class TransferCommenceRequestEndpointV1 implements IWebServiceEndpoint { public getVerbLowerCase(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase2/transfercommencerequest" + "/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-odap-hermes/phase2/transfercommencerequest" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase2/transfercommencerequest" ].post.operationId; } diff --git a/packages/cactus-plugin-odap-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 similarity index 90% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/web-services/server-side/transfer-complete-request-endpoint.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-complete-request-endpoint.ts index 126763338a..f2d57b398a 100644 --- a/packages/cactus-plugin-odap-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 @@ -15,12 +15,12 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginOdapGateway } from "../../gateway/plugin-odap-gateway"; +import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface ITransferCompleteRequestEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginOdapGateway; + gateway: PluginSatpGateway; } export class TransferCompleteRequestEndpointV1 implements IWebServiceEndpoint { @@ -47,7 +47,7 @@ export class TransferCompleteRequestEndpointV1 implements IWebServiceEndpoint { public getPath(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/transfercompleterequest" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest" ]; return apiPath.get["x-hyperledger-cacti"].http.path; } @@ -55,14 +55,14 @@ export class TransferCompleteRequestEndpointV1 implements IWebServiceEndpoint { public getVerbLowerCase(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase3/transfercompleterequest" + "/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-odap-hermes/phase3/transfercompleterequest" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase3/transfercompleterequest" ].get.operationId; } diff --git a/packages/cactus-plugin-odap-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 similarity index 90% rename from packages/cactus-plugin-odap-hermes/src/main/typescript/web-services/server-side/transfer-initiation-request-endpoint.ts rename to packages/cactus-plugin-satp-hermes/src/main/typescript/web-services/server-side/transfer-initiation-request-endpoint.ts index 33181c087f..68c9e29d37 100644 --- a/packages/cactus-plugin-odap-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 @@ -15,12 +15,12 @@ import { import { registerWebServiceEndpoint } from "@hyperledger/cactus-core"; -import { PluginOdapGateway } from "../../gateway/plugin-odap-gateway"; +import { PluginSatpGateway } from "../../gateway/plugin-satp-gateway"; import OAS from "../../../json/openapi.json"; export interface ITransferInitiationRequestEndpointOptions { logLevel?: LogLevelDesc; - gateway: PluginOdapGateway; + gateway: PluginSatpGateway; } export class TransferInitiationRequestEndpointV1 @@ -49,7 +49,7 @@ export class TransferInitiationRequestEndpointV1 public getPath(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase1/transferinitiationrequest" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest" ]; return apiPath.post["x-hyperledger-cacti"].http.path; } @@ -57,14 +57,14 @@ export class TransferInitiationRequestEndpointV1 public getVerbLowerCase(): string { const apiPath = OAS.paths[ - "/api/v1/@hyperledger/cactus-plugin-odap-hermes/phase1/transferinitiationrequest" + "/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-odap-hermes/phase1/transferinitiationrequest" + "/api/v1/@hyperledger/cactus-plugin-satp-hermes/phase1/transferinitiationrequest" ].post.operationId; } diff --git a/packages/cactus-plugin-odap-hermes/src/test/solidity/lock-asset-contract/LockAsset.json b/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/LockAsset.json similarity index 99% rename from packages/cactus-plugin-odap-hermes/src/test/solidity/lock-asset-contract/LockAsset.json rename to packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/LockAsset.json index 2ff00aa609..fda660818a 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/solidity/lock-asset-contract/LockAsset.json +++ b/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/LockAsset.json @@ -133,18 +133,18 @@ "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-odap-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-odap-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol\":{\"keccak256\":\"0xde0438e010cd77bfc1516697230fbcec20e85bd7fdbc8df9225abb5c9dd6c7ed\",\"urls\":[\"bzz-raw://865f301eada0615be375c9313d3abce9458dcbb5311dedf805cad921accda557\",\"dweb:/ipfs/QmY1r6Z7PM8ypYy59rWqozy3Mkcv9nMd4xRcfpCbwN4LQK\"]}},\"version\":1}", + "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-odap-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol", + "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-odap-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol", + "absolutePath": "/home/andre_9a/cactus/packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol", "exportedSymbols": { "Asset": [ 8 diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol rename to packages/cactus-plugin-satp-hermes/src/test/solidity/lock-asset-contract/lock-asset.sol diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/.gitignore rename to packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/.gitignore diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/package.json rename to packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/package.json diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/asset.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/asset.ts diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/assetTransfer.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/assetTransfer.ts diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/index.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/src/index.ts diff --git a/packages/cactus-plugin-odap-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 similarity index 100% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/tsconfig.json rename to packages/cactus-plugin-satp-hermes/src/test/typescript/fabric-contracts/lock-asset/chaincode-typescript/tsconfig.json diff --git a/packages/cactus-plugin-odap-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 similarity index 94% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/integration/backup-gateway-after-client-crash.test.ts index c7faa43c05..37c1c8807e 100644 --- a/packages/cactus-plugin-odap-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 @@ -33,7 +33,7 @@ import { PluginImportType, Constants, } from "@hyperledger/cactus-core-api"; -import { PluginOdapGateway } from "../../../main/typescript/gateway/plugin-odap-gateway"; +import { PluginSatpGateway } from "../../../main/typescript/gateway/plugin-satp-gateway"; import { ChainCodeProgrammingLanguage, DefaultEventHandlerStrategy, @@ -56,13 +56,13 @@ import Web3 from "web3"; import { makeSessionDataChecks } from "../make-checks"; import { - FabricOdapGateway, - IFabricOdapGatewayConstructorOptions, -} from "../../../main/typescript/gateway/fabric-odap-gateway"; + FabricSatpGateway, + IFabricSatpGatewayConstructorOptions, +} from "../../../main/typescript/gateway/fabric-satp-gateway"; import { - BesuOdapGateway, - IBesuOdapGatewayConstructorOptions, -} from "../../../main/typescript/gateway/besu-odap-gateway"; + 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"; @@ -101,13 +101,13 @@ let besuKeychainId: string; let fabricConnector: PluginLedgerConnectorFabric; let besuConnector: PluginLedgerConnectorBesu; -let odapClientGatewayPluginOptions: IFabricOdapGatewayConstructorOptions; -let odapServerGatewayPluginOptions: IBesuOdapGatewayConstructorOptions; -let pluginSourceGateway: FabricOdapGateway; -let pluginRecipientGateway: BesuOdapGateway; +let clientGatewayPluginOptions: IFabricSatpGatewayConstructorOptions; +let serverGatewayPluginOptions: IBesuSatpGatewayConstructorOptions; +let pluginSourceGateway: FabricSatpGateway; +let pluginRecipientGateway: BesuSatpGateway; -let odapClientGatewayApiHost: string; -let odapServerGatewayApiHost: string; +let clientGatewayApiHost: string; +let serverGatewayApiHost: string; const backupGatewayKeys = Secp256k1Keys.generateKeyPairsBuffer(); @@ -119,7 +119,7 @@ const BESU_ASSET_ID = uuidv4(); const log = LoggerProvider.getOrCreate({ level: "INFO", - label: "odapTestWithBackupGateway", + label: "satpTestWithBackupGateway", }); beforeAll(async () => { @@ -564,11 +564,11 @@ beforeAll(async () => { // Gateways configuration const allowedGateways = []; allowedGateways.push( - PluginOdapGateway.bufArray2HexStr(backupGatewayKeys.publicKey), + PluginSatpGateway.bufArray2HexStr(backupGatewayKeys.publicKey), ); - odapClientGatewayPluginOptions = { - name: "cactus-plugin#odapGateway", + clientGatewayPluginOptions = { + name: "cactus-plugin#satpGateway", dltIDs: ["DLT2"], instanceId: uuidv4(), keyPair: Secp256k1Keys.generateKeyPairsBuffer(), @@ -583,8 +583,8 @@ beforeAll(async () => { knexConfig: knexClientConnection, }; - odapServerGatewayPluginOptions = { - name: "cactus-plugin#odapGateway", + serverGatewayPluginOptions = { + name: "cactus-plugin#satpGateway", dltIDs: ["DLT1"], instanceId: uuidv4(), keyPair: Secp256k1Keys.generateKeyPairsBuffer(), @@ -598,9 +598,9 @@ beforeAll(async () => { knexConfig: knexServerConnection, }; - pluginSourceGateway = new FabricOdapGateway(odapClientGatewayPluginOptions); - pluginRecipientGateway = new BesuOdapGateway( - odapServerGatewayPluginOptions, + pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); + pluginRecipientGateway = new BesuSatpGateway( + serverGatewayPluginOptions, ); expect(pluginSourceGateway.database).not.toBeUndefined(); @@ -625,7 +625,7 @@ beforeAll(async () => { const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; const { address, port } = addressInfo; - odapServerGatewayApiHost = `http://${address}:${port}`; + serverGatewayApiHost = `http://${address}:${port}`; await pluginRecipientGateway.getOrCreateWebServices(); await pluginRecipientGateway.registerWebServices(expressApp); @@ -644,7 +644,7 @@ beforeAll(async () => { const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; const { address, port } = addressInfo; - odapClientGatewayApiHost = `http://${address}:${port}`; + clientGatewayApiHost = `http://${address}:${port}`; await pluginSourceGateway.getOrCreateWebServices(); await pluginSourceGateway.registerWebServices(expressApp); @@ -655,12 +655,12 @@ test("client gateway crashes after lock fabric asset", async () => { const expiryDate = new Date(2060, 11, 24).toString(); const assetProfile: AssetProfile = { expirationDate: expiryDate }; - const odapClientRequest: ClientV1Request = { + const clientRequest: ClientV1Request = { clientGatewayConfiguration: { - apiHost: odapClientGatewayApiHost, + apiHost: clientGatewayApiHost, }, serverGatewayConfiguration: { - apiHost: odapServerGatewayApiHost, + apiHost: serverGatewayApiHost, }, version: "0.0.0", loggingProfile: "dummyLoggingProfile", @@ -687,7 +687,7 @@ test("client gateway crashes after lock fabric asset", async () => { recipientLedgerAssetID: BESU_ASSET_ID, }; - const sessionID = pluginSourceGateway.configureOdapSession(odapClientRequest); + const sessionID = pluginSourceGateway.configureOdapSession(clientRequest); const transferInitializationRequest = await pluginSourceGateway.clientHelper.sendTransferInitializationRequest( @@ -809,8 +809,8 @@ test("client gateway crashes after lock fabric asset", async () => { await Servers.listen(listenOptions); // Backup gateway configuration - odapClientGatewayPluginOptions = { - name: "cactus-plugin#odapGateway", + clientGatewayPluginOptions = { + name: "cactus-plugin#satpGateway", dltIDs: ["DLT2"], instanceId: uuidv4(), keyPair: backupGatewayKeys, @@ -824,7 +824,7 @@ test("client gateway crashes after lock fabric asset", async () => { knexConfig: knexClientConnection, }; - pluginSourceGateway = new FabricOdapGateway(odapClientGatewayPluginOptions); + pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); await pluginSourceGateway.getOrCreateWebServices(); await pluginSourceGateway.registerWebServices(expressApp); diff --git a/packages/cactus-plugin-odap-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 similarity index 95% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-delete-asset.test.ts index 590e4fd431..0afb4f775b 100644 --- a/packages/cactus-plugin-odap-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 @@ -55,13 +55,13 @@ import Web3 from "web3"; import { makeSessionDataChecks } from "../make-checks"; import { - IFabricOdapGatewayConstructorOptions, - FabricOdapGateway, -} from "../../../main/typescript/gateway/fabric-odap-gateway"; + IFabricSatpGatewayConstructorOptions, + FabricSatpGateway, +} from "../../../main/typescript/gateway/fabric-satp-gateway"; import { - IBesuOdapGatewayConstructorOptions, - BesuOdapGateway, -} from "../../../main/typescript/gateway/besu-odap-gateway"; + 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"; @@ -100,13 +100,13 @@ let besuKeychainId: string; let fabricConnector: PluginLedgerConnectorFabric; let besuConnector: PluginLedgerConnectorBesu; -let odapClientGatewayPluginOptions: IFabricOdapGatewayConstructorOptions; -let odapServerGatewayPluginOptions: IBesuOdapGatewayConstructorOptions; -let pluginSourceGateway: FabricOdapGateway; -let pluginRecipientGateway: BesuOdapGateway; +let clientGatewayPluginOptions: IFabricSatpGatewayConstructorOptions; +let serverGatewayPluginOptions: IBesuSatpGatewayConstructorOptions; +let pluginSourceGateway: FabricSatpGateway; +let pluginRecipientGateway: BesuSatpGateway; -let odapClientGatewayApiHost: string; -let odapServerGatewayApiHost: string; +let clientGatewayApiHost: string; +let serverGatewayApiHost: string; const MAX_RETRIES = 5; const MAX_TIMEOUT = 5000; @@ -116,7 +116,7 @@ const BESU_ASSET_ID = uuidv4(); const log = LoggerProvider.getOrCreate({ level: "INFO", - label: "odapTestWithLedgerConnectors", + label: "satpTestWithLedgerConnectors", }); beforeAll(async () => { @@ -558,8 +558,8 @@ beforeAll(async () => { } { // Gateways configuration - odapClientGatewayPluginOptions = { - name: "cactus-plugin#odapGateway", + clientGatewayPluginOptions = { + name: "cactus-plugin#satpGateway", dltIDs: ["DLT2"], instanceId: uuidv4(), keyPair: Secp256k1Keys.generateKeyPairsBuffer(), @@ -573,8 +573,8 @@ beforeAll(async () => { knexConfig: knexServerConnection, }; - odapServerGatewayPluginOptions = { - name: "cactus-plugin#odapGateway", + serverGatewayPluginOptions = { + name: "cactus-plugin#satpGateway", dltIDs: ["DLT1"], instanceId: uuidv4(), keyPair: Secp256k1Keys.generateKeyPairsBuffer(), @@ -588,9 +588,9 @@ beforeAll(async () => { knexConfig: knexClientConnection, }; - pluginSourceGateway = new FabricOdapGateway(odapClientGatewayPluginOptions); - pluginRecipientGateway = new BesuOdapGateway( - odapServerGatewayPluginOptions, + pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); + pluginRecipientGateway = new BesuSatpGateway( + serverGatewayPluginOptions, ); expect(pluginSourceGateway.database).not.toBeUndefined(); @@ -615,7 +615,7 @@ beforeAll(async () => { const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; const { address, port } = addressInfo; - odapServerGatewayApiHost = `http://${address}:${port}`; + serverGatewayApiHost = `http://${address}:${port}`; await pluginRecipientGateway.getOrCreateWebServices(); await pluginRecipientGateway.registerWebServices(expressApp); @@ -634,7 +634,7 @@ beforeAll(async () => { const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; const { address, port } = addressInfo; - odapClientGatewayApiHost = `http://${address}:${port}`; + clientGatewayApiHost = `http://${address}:${port}`; await pluginSourceGateway.getOrCreateWebServices(); await pluginSourceGateway.registerWebServices(expressApp); @@ -645,12 +645,12 @@ test("client gateway crashes after deleting fabric asset", async () => { const expiryDate = new Date(2060, 11, 24).toString(); const assetProfile: AssetProfile = { expirationDate: expiryDate }; - const odapClientRequest: ClientV1Request = { + const clientRequest: ClientV1Request = { clientGatewayConfiguration: { - apiHost: odapClientGatewayApiHost, + apiHost: clientGatewayApiHost, }, serverGatewayConfiguration: { - apiHost: odapServerGatewayApiHost, + apiHost: serverGatewayApiHost, }, version: "0.0.0", loggingProfile: "dummyLoggingProfile", @@ -677,7 +677,7 @@ test("client gateway crashes after deleting fabric asset", async () => { recipientLedgerAssetID: BESU_ASSET_ID, }; - const sessionID = pluginSourceGateway.configureOdapSession(odapClientRequest); + const sessionID = pluginSourceGateway.configureOdapSession(clientRequest); const transferInitializationRequest = await pluginSourceGateway.clientHelper.sendTransferInitializationRequest( @@ -834,7 +834,7 @@ test("client gateway crashes after deleting fabric asset", async () => { await Servers.listen(listenOptions); - pluginSourceGateway = new FabricOdapGateway(odapClientGatewayPluginOptions); + pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); await pluginSourceGateway.registerWebServices(expressApp); // client gateway self-healed and is back online diff --git a/packages/cactus-plugin-odap-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 similarity index 94% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-lock-asset.test.ts index 2b25f13e64..9739e31846 100644 --- a/packages/cactus-plugin-odap-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 @@ -55,13 +55,13 @@ import Web3 from "web3"; import { makeSessionDataChecks } from "../make-checks"; import { - BesuOdapGateway, - IBesuOdapGatewayConstructorOptions, -} from "../../../main/typescript/gateway/besu-odap-gateway"; + BesuSatpGateway, + IBesuSatpGatewayConstructorOptions, +} from "../../../main/typescript/gateway/besu-satp-gateway"; import { - FabricOdapGateway, - IFabricOdapGatewayConstructorOptions, -} from "../../../main/typescript/gateway/fabric-odap-gateway"; + 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"; @@ -100,13 +100,13 @@ let besuKeychainId: string; let fabricConnector: PluginLedgerConnectorFabric; let besuConnector: PluginLedgerConnectorBesu; -let odapClientGatewayPluginOptions: IFabricOdapGatewayConstructorOptions; -let odapServerGatewayPluginOptions: IBesuOdapGatewayConstructorOptions; -let pluginSourceGateway: FabricOdapGateway; -let pluginRecipientGateway: BesuOdapGateway; +let clientGatewayPluginOptions: IFabricSatpGatewayConstructorOptions; +let serverGatewayPluginOptions: IBesuSatpGatewayConstructorOptions; +let pluginSourceGateway: FabricSatpGateway; +let pluginRecipientGateway: BesuSatpGateway; -let odapClientGatewayApiHost: string; -let odapServerGatewayApiHost: string; +let clientGatewayApiHost: string; +let serverGatewayApiHost: string; const MAX_RETRIES = 5; const MAX_TIMEOUT = 5000; @@ -116,7 +116,7 @@ const BESU_ASSET_ID = uuidv4(); const log = LoggerProvider.getOrCreate({ level: "INFO", - label: "odapTestWithLedgerConnectors", + label: "satpTestWithLedgerConnectors", }); beforeAll(async () => { @@ -559,8 +559,8 @@ beforeAll(async () => { } { // Gateways configuration - odapClientGatewayPluginOptions = { - name: "cactus-plugin#odapGateway", + clientGatewayPluginOptions = { + name: "cactus-plugin#satpGateway", dltIDs: ["DLT2"], instanceId: uuidv4(), keyPair: Secp256k1Keys.generateKeyPairsBuffer(), @@ -574,8 +574,8 @@ beforeAll(async () => { knexConfig: knexServerConnection, }; - odapServerGatewayPluginOptions = { - name: "cactus-plugin#odapGateway", + serverGatewayPluginOptions = { + name: "cactus-plugin#satpGateway", dltIDs: ["DLT1"], instanceId: uuidv4(), keyPair: Secp256k1Keys.generateKeyPairsBuffer(), @@ -589,9 +589,9 @@ beforeAll(async () => { knexConfig: knexClientConnection, }; - pluginSourceGateway = new FabricOdapGateway(odapClientGatewayPluginOptions); - pluginRecipientGateway = new BesuOdapGateway( - odapServerGatewayPluginOptions, + pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); + pluginRecipientGateway = new BesuSatpGateway( + serverGatewayPluginOptions, ); expect(pluginSourceGateway.database).not.toBeUndefined(); @@ -616,7 +616,7 @@ beforeAll(async () => { const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; const { address, port } = addressInfo; - odapServerGatewayApiHost = `http://${address}:${port}`; + serverGatewayApiHost = `http://${address}:${port}`; await pluginRecipientGateway.getOrCreateWebServices(); await pluginRecipientGateway.registerWebServices(expressApp); @@ -635,7 +635,7 @@ beforeAll(async () => { const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; const { address, port } = addressInfo; - odapClientGatewayApiHost = `http://${address}:${port}`; + clientGatewayApiHost = `http://${address}:${port}`; await pluginSourceGateway.getOrCreateWebServices(); await pluginSourceGateway.registerWebServices(expressApp); @@ -646,12 +646,12 @@ test("client gateway crashes after lock fabric asset", async () => { const expiryDate = new Date(2060, 11, 24).toString(); const assetProfile: AssetProfile = { expirationDate: expiryDate }; - const odapClientRequest: ClientV1Request = { + const clientRequest: ClientV1Request = { clientGatewayConfiguration: { - apiHost: odapClientGatewayApiHost, + apiHost: clientGatewayApiHost, }, serverGatewayConfiguration: { - apiHost: odapServerGatewayApiHost, + apiHost: serverGatewayApiHost, }, version: "0.0.0", loggingProfile: "dummyLoggingProfile", @@ -678,7 +678,7 @@ test("client gateway crashes after lock fabric asset", async () => { recipientLedgerAssetID: BESU_ASSET_ID, }; - const sessionID = pluginSourceGateway.configureOdapSession(odapClientRequest); + const sessionID = pluginSourceGateway.configureOdapSession(clientRequest); const transferInitializationRequest = await pluginSourceGateway.clientHelper.sendTransferInitializationRequest( @@ -770,7 +770,7 @@ test("client gateway crashes after lock fabric asset", async () => { await Servers.listen(listenOptions); - pluginSourceGateway = new FabricOdapGateway(odapClientGatewayPluginOptions); + pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); await pluginSourceGateway.registerWebServices(expressApp); // client gateway self-healed and is back online diff --git a/packages/cactus-plugin-odap-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 similarity index 86% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/integration/client-crash-after-transfer-initiation.test.ts index ed2d4b4d59..1fe269bec7 100644 --- a/packages/cactus-plugin-odap-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 @@ -14,9 +14,9 @@ import { } from "@hyperledger/cactus-common"; import { Configuration } from "@hyperledger/cactus-core-api"; import { - IPluginOdapGatewayConstructorOptions, - PluginOdapGateway, -} from "../../../main/typescript/gateway/plugin-odap-gateway"; + IPluginSatpGatewayConstructorOptions, + PluginSatpGateway, +} from "../../../main/typescript/gateway/plugin-satp-gateway"; import { GoIpfsTestContainer } from "@hyperledger/cactus-test-tooling"; import { AssetProfile, @@ -24,8 +24,8 @@ import { } from "../../../main/typescript/public-api"; import { makeSessionDataChecks } from "../make-checks"; -import { BesuOdapGateway } from "../../../main/typescript/gateway/besu-odap-gateway"; -import { FabricOdapGateway } from "../../../main/typescript/gateway/fabric-odap-gateway"; +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"; @@ -39,11 +39,11 @@ const BESU_ASSET_ID = uuidv4(); const logLevel: LogLevelDesc = "INFO"; -let odapServerGatewayPluginOptions: IPluginOdapGatewayConstructorOptions; -let odapClientGatewayPluginOptions: IPluginOdapGatewayConstructorOptions; +let serverGatewayPluginOptions: IPluginSatpGatewayConstructorOptions; +let clientGatewayPluginOptions: IPluginSatpGatewayConstructorOptions; -let pluginSourceGateway: PluginOdapGateway; -let pluginRecipientGateway: PluginOdapGateway; +let pluginSourceGateway: PluginSatpGateway; +let pluginRecipientGateway: PluginSatpGateway; let ipfsContainer: GoIpfsTestContainer; let ipfsApiHost: string; @@ -52,10 +52,10 @@ let ipfsServer: Server; let sourceGatewayServer: Server; let recipientGatewayserver: Server; -let odapServerGatewayApiHost: string; -let odapClientGatewayApiHost: string; +let serverGatewayApiHost: string; +let clientGatewayApiHost: string; -let odapClientRequest: ClientV1Request; +let clientRequest: ClientV1Request; let serverExpressApp: Express; let serverListenOptions: IListenOptions; @@ -110,8 +110,8 @@ beforeAll(async () => { } { // Server Gateway configuration - odapServerGatewayPluginOptions = { - name: "cactus-plugin#odapGateway", + serverGatewayPluginOptions = { + name: "cactus-plugin#satpGateway", dltIDs: ["DLT1"], instanceId: uuidv4(), ipfsPath: ipfsApiHost, @@ -135,10 +135,10 @@ beforeAll(async () => { )) as AddressInfo; const { address, port } = addressInfo; - odapServerGatewayApiHost = `http://${address}:${port}`; + serverGatewayApiHost = `http://${address}:${port}`; - pluginRecipientGateway = new BesuOdapGateway( - odapServerGatewayPluginOptions, + pluginRecipientGateway = new BesuSatpGateway( + serverGatewayPluginOptions, ); expect(pluginRecipientGateway.database).not.toBeUndefined(); @@ -150,8 +150,8 @@ beforeAll(async () => { } { // Client Gateway configuration - odapClientGatewayPluginOptions = { - name: "cactus-plugin#odapGateway", + clientGatewayPluginOptions = { + name: "cactus-plugin#satpGateway", dltIDs: ["DLT2"], instanceId: uuidv4(), ipfsPath: ipfsApiHost, @@ -175,9 +175,9 @@ beforeAll(async () => { )) as AddressInfo; const { address, port } = addressInfo; - odapClientGatewayApiHost = `http://${address}:${port}`; + clientGatewayApiHost = `http://${address}:${port}`; - pluginSourceGateway = new FabricOdapGateway(odapClientGatewayPluginOptions); + pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); if (pluginSourceGateway.database == undefined) { throw new Error("Database is not correctly initialized"); @@ -191,12 +191,12 @@ beforeAll(async () => { const expiryDate = new Date(2060, 11, 24).toString(); const assetProfile: AssetProfile = { expirationDate: expiryDate }; - odapClientRequest = { + clientRequest = { clientGatewayConfiguration: { - apiHost: odapClientGatewayApiHost, + apiHost: clientGatewayApiHost, }, serverGatewayConfiguration: { - apiHost: odapServerGatewayApiHost, + apiHost: serverGatewayApiHost, }, version: "0.0.0", loggingProfile: "dummyLoggingProfile", @@ -245,7 +245,7 @@ afterEach(() => { }); test("successful run ODAP after client gateway crashed after after receiving transfer initiation response", async () => { - const sessionID = pluginSourceGateway.configureOdapSession(odapClientRequest); + const sessionID = pluginSourceGateway.configureOdapSession(clientRequest); const transferInitializationRequest = await pluginSourceGateway.clientHelper.sendTransferInitializationRequest( @@ -296,7 +296,7 @@ test("successful run ODAP after client gateway crashed after after receiving tra await Servers.listen(listenOptions); - pluginSourceGateway = new FabricOdapGateway(odapClientGatewayPluginOptions); + pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); await pluginSourceGateway.registerWebServices(clientExpressApp); // client gateway self-healed and is back online diff --git a/packages/cactus-plugin-odap-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 similarity index 94% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call-with-ledger-connector.test.ts index f1e10e8890..e8ead19647 100644 --- a/packages/cactus-plugin-odap-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 @@ -55,13 +55,13 @@ import { import { makeSessionDataChecks } from "../make-checks"; import { - FabricOdapGateway, - IFabricOdapGatewayConstructorOptions, -} from "../../../main/typescript/gateway/fabric-odap-gateway"; + FabricSatpGateway, + IFabricSatpGatewayConstructorOptions, +} from "../../../main/typescript/gateway/fabric-satp-gateway"; import { - BesuOdapGateway, - IBesuOdapGatewayConstructorOptions, -} from "../../../main/typescript/gateway/besu-odap-gateway"; + 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"; @@ -97,11 +97,11 @@ let besuKeychainId: string; let fabricConnector: PluginLedgerConnectorFabric; let besuConnector: PluginLedgerConnectorBesu; -let pluginSourceGateway: FabricOdapGateway; -let pluginRecipientGateway: BesuOdapGateway; +let pluginSourceGateway: FabricSatpGateway; +let pluginRecipientGateway: BesuSatpGateway; -let odapClientGatewayApiHost: string; -let odapServerGatewayApiHost: string; +let clientGatewayApiHost: string; +let serverGatewayApiHost: string; const MAX_RETRIES = 5; const MAX_TIMEOUT = 5000; @@ -111,7 +111,7 @@ const BESU_ASSET_ID = uuidv4(); const log = LoggerProvider.getOrCreate({ level: "INFO", - label: "odapTestWithLedgerConnectors", + label: "satpTestWithLedgerConnectors", }); beforeAll(async () => { @@ -528,9 +528,9 @@ beforeAll(async () => { { // Gateways configuration - const odapClientGatewayPluginOptions: IFabricOdapGatewayConstructorOptions = + const clientGatewayPluginOptions: IFabricSatpGatewayConstructorOptions = { - name: "cactus-plugin#odapGateway", + name: "cactus-plugin#satpGateway", dltIDs: ["DLT2"], instanceId: uuidv4(), ipfsPath: ipfsApiHost, @@ -542,8 +542,8 @@ beforeAll(async () => { serverHelper: new ServerGatewayHelper(), }; - const odapServerGatewayPluginOptions: IBesuOdapGatewayConstructorOptions = { - name: "cactus-plugin#odapGateway", + const serverGatewayPluginOptions: IBesuSatpGatewayConstructorOptions = { + name: "cactus-plugin#satpGateway", dltIDs: ["DLT1"], instanceId: uuidv4(), ipfsPath: ipfsApiHost, @@ -555,9 +555,9 @@ beforeAll(async () => { serverHelper: new ServerGatewayHelper(), }; - pluginSourceGateway = new FabricOdapGateway(odapClientGatewayPluginOptions); - pluginRecipientGateway = new BesuOdapGateway( - odapServerGatewayPluginOptions, + pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); + pluginRecipientGateway = new BesuSatpGateway( + serverGatewayPluginOptions, ); expect(pluginSourceGateway.database).not.toBeUndefined(); @@ -582,7 +582,7 @@ beforeAll(async () => { const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; const { address, port } = addressInfo; - odapServerGatewayApiHost = `http://${address}:${port}`; + serverGatewayApiHost = `http://${address}:${port}`; await pluginRecipientGateway.getOrCreateWebServices(); await pluginRecipientGateway.registerWebServices(expressApp); @@ -601,7 +601,7 @@ beforeAll(async () => { const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; const { address, port } = addressInfo; - odapClientGatewayApiHost = `http://${address}:${port}`; + clientGatewayApiHost = `http://${address}:${port}`; await pluginSourceGateway.getOrCreateWebServices(); await pluginSourceGateway.registerWebServices(expressApp); @@ -610,19 +610,19 @@ beforeAll(async () => { test("runs ODAP between two gateways via openApi", async () => { const odapApiConfig = new Configuration({ - basePath: odapClientGatewayApiHost, + basePath: clientGatewayApiHost, }); const apiClient = new OdapApi(odapApiConfig); const expiryDate = new Date(2060, 11, 24).toString(); const assetProfile: AssetProfile = { expirationDate: expiryDate }; - const odapClientRequest: ClientV1Request = { + const clientRequest: ClientV1Request = { clientGatewayConfiguration: { - apiHost: odapClientGatewayApiHost, + apiHost: clientGatewayApiHost, }, serverGatewayConfiguration: { - apiHost: odapServerGatewayApiHost, + apiHost: serverGatewayApiHost, }, version: "0.0.0", loggingProfile: "dummyLoggingProfile", @@ -649,7 +649,7 @@ test("runs ODAP between two gateways via openApi", async () => { recipientLedgerAssetID: BESU_ASSET_ID, }; - const res = await apiClient.clientRequestV1(odapClientRequest); + const res = await apiClient.clientRequestV1(clientRequest); expect(res.status).toBe(200); expect(pluginSourceGateway.sessions.size).toBe(1); diff --git a/packages/cactus-plugin-odap-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 similarity index 84% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-api-call.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-api-call.test.ts index a89617c6fc..e6e857623e 100644 --- a/packages/cactus-plugin-odap-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 @@ -19,17 +19,17 @@ import { Configuration } from "@hyperledger/cactus-core-api"; import { GoIpfsTestContainer } from "@hyperledger/cactus-test-tooling"; import { - PluginOdapGateway, - IPluginOdapGatewayConstructorOptions, -} from "../../../main/typescript/gateway/plugin-odap-gateway"; + PluginSatpGateway, + IPluginSatpGatewayConstructorOptions, +} from "../../../main/typescript/gateway/plugin-satp-gateway"; import { AssetProfile, ClientV1Request, } from "../../../main/typescript/public-api"; import { makeSessionDataChecks } from "../make-checks"; -import { BesuOdapGateway } from "../../../main/typescript/gateway/besu-odap-gateway"; -import { FabricOdapGateway } from "../../../main/typescript/gateway/fabric-odap-gateway"; +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"; @@ -48,8 +48,8 @@ let sourceGatewayServer: Server; let recipientGatewayserver: Server; let ipfsServer: Server; -let pluginSourceGateway: PluginOdapGateway; -let pluginRecipientGateway: PluginOdapGateway; +let pluginSourceGateway: PluginSatpGateway; +let pluginRecipientGateway: PluginSatpGateway; beforeAll(async () => { ipfsContainer = new GoIpfsTestContainer({ logLevel }); @@ -96,8 +96,8 @@ beforeAll(async () => { }); test("runs ODAP between two gateways via openApi", async () => { - const odapClientGatewayPluginOptions: IPluginOdapGatewayConstructorOptions = { - name: "cactus-plugin#odapGateway", + const clientGatewayPluginOptions: IPluginSatpGatewayConstructorOptions = { + name: "cactus-plugin#satpGateway", dltIDs: ["DLT2"], instanceId: uuidv4(), ipfsPath: ipfsApiHost, @@ -105,8 +105,8 @@ test("runs ODAP between two gateways via openApi", async () => { serverHelper: new ServerGatewayHelper(), }; - const odapServerGatewayPluginOptions: IPluginOdapGatewayConstructorOptions = { - name: "cactus-plugin#odapGateway", + const serverGatewayPluginOptions: IPluginSatpGatewayConstructorOptions = { + name: "cactus-plugin#satpGateway", dltIDs: ["DLT1"], instanceId: uuidv4(), ipfsPath: ipfsApiHost, @@ -114,8 +114,8 @@ test("runs ODAP between two gateways via openApi", async () => { serverHelper: new ServerGatewayHelper(), }; - pluginSourceGateway = new FabricOdapGateway(odapClientGatewayPluginOptions); - pluginRecipientGateway = new BesuOdapGateway(odapServerGatewayPluginOptions); + pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); + pluginRecipientGateway = new BesuSatpGateway(serverGatewayPluginOptions); expect(pluginSourceGateway.database).not.toBeUndefined(); expect(pluginRecipientGateway.database).not.toBeUndefined(); @@ -125,7 +125,7 @@ test("runs ODAP between two gateways via openApi", async () => { await pluginRecipientGateway.database?.migrate.rollback(); await pluginRecipientGateway.database?.migrate.latest(); - let odapServerGatewayApiHost: string; + let serverGatewayApiHost: string; { // Server Gateway configuration @@ -141,7 +141,7 @@ test("runs ODAP between two gateways via openApi", async () => { const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; const { address, port } = addressInfo; - odapServerGatewayApiHost = `http://${address}:${port}`; + serverGatewayApiHost = `http://${address}:${port}`; await pluginRecipientGateway.getOrCreateWebServices(); await pluginRecipientGateway.registerWebServices(expressApp); @@ -160,25 +160,25 @@ test("runs ODAP between two gateways via openApi", async () => { const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; const { address, port } = addressInfo; - const odapClientGatewayApiHost = `http://${address}:${port}`; + const clientGatewayApiHost = `http://${address}:${port}`; await pluginSourceGateway.getOrCreateWebServices(); await pluginSourceGateway.registerWebServices(expressApp); const odapApiConfig = new Configuration({ - basePath: odapClientGatewayApiHost, + basePath: clientGatewayApiHost, }); const apiClient = new OdapApi(odapApiConfig); const expiryDate = new Date(2060, 11, 24).toString(); const assetProfile: AssetProfile = { expirationDate: expiryDate }; - const odapClientRequest: ClientV1Request = { + const clientRequest: ClientV1Request = { clientGatewayConfiguration: { - apiHost: odapClientGatewayApiHost, + apiHost: clientGatewayApiHost, }, serverGatewayConfiguration: { - apiHost: odapServerGatewayApiHost, + apiHost: serverGatewayApiHost, }, version: "0.0.0", loggingProfile: "dummyLoggingProfile", @@ -204,7 +204,7 @@ test("runs ODAP between two gateways via openApi", async () => { sourceLedgerAssetID: FABRIC_ASSET_ID, recipientLedgerAssetID: BESU_ASSET_ID, }; - const res = await apiClient.clientRequestV1(odapClientRequest); + const res = await apiClient.clientRequestV1(clientRequest); expect(res.status).toBe(200); } diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-rollback.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-rollback.test.ts similarity index 95% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-rollback.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-rollback.test.ts index c70f86093e..58418a2a57 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap-rollback.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap-rollback.test.ts @@ -57,13 +57,13 @@ import { import Web3 from "web3"; import { - IFabricOdapGatewayConstructorOptions, - FabricOdapGateway, -} from "../../../main/typescript/gateway/fabric-odap-gateway"; + IFabricSatpGatewayConstructorOptions, + FabricSatpGateway, +} from "../../../main/typescript/gateway/fabric-satp-gateway"; import { - IBesuOdapGatewayConstructorOptions, - BesuOdapGateway, -} from "../../../main/typescript/gateway/besu-odap-gateway"; + 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"; @@ -100,13 +100,13 @@ let besuKeychainId: string; let fabricConnector: PluginLedgerConnectorFabric; let besuConnector: PluginLedgerConnectorBesu; -let odapClientGatewayApiHost: string; -let odapServerGatewayApiHost: string; +let clientGatewayApiHost: string; +let serverGatewayApiHost: string; -let odapClientGatewayPluginOptions: IFabricOdapGatewayConstructorOptions; -let odapServerGatewayPluginOptions: IBesuOdapGatewayConstructorOptions; -let pluginSourceGateway: FabricOdapGateway; -let pluginRecipientGateway: BesuOdapGateway; +let clientGatewayPluginOptions: IFabricSatpGatewayConstructorOptions; +let serverGatewayPluginOptions: IBesuSatpGatewayConstructorOptions; +let pluginSourceGateway: FabricSatpGateway; +let pluginRecipientGateway: BesuSatpGateway; const MAX_RETRIES = 5; const MAX_TIMEOUT = 5000; @@ -561,8 +561,8 @@ beforeAll(async () => { } { // Gateways configuration - odapClientGatewayPluginOptions = { - name: "cactus-plugin#odapGateway", + clientGatewayPluginOptions = { + name: "cactus-plugin#satpGateway", dltIDs: ["DLT2"], instanceId: uuidv4(), keyPair: Secp256k1Keys.generateKeyPairsBuffer(), @@ -575,8 +575,8 @@ beforeAll(async () => { serverHelper: new ServerGatewayHelper(), }; - odapServerGatewayPluginOptions = { - name: "cactus-plugin#odapGateway", + serverGatewayPluginOptions = { + name: "cactus-plugin#satpGateway", dltIDs: ["DLT1"], instanceId: uuidv4(), keyPair: Secp256k1Keys.generateKeyPairsBuffer(), @@ -589,9 +589,9 @@ beforeAll(async () => { serverHelper: new ServerGatewayHelper(), }; - pluginSourceGateway = new FabricOdapGateway(odapClientGatewayPluginOptions); - pluginRecipientGateway = new BesuOdapGateway( - odapServerGatewayPluginOptions, + pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); + pluginRecipientGateway = new BesuSatpGateway( + serverGatewayPluginOptions, ); expect(pluginSourceGateway.database).not.toBeUndefined(); @@ -616,7 +616,7 @@ beforeAll(async () => { const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; const { address, port } = addressInfo; - odapServerGatewayApiHost = `http://${address}:${port}`; + serverGatewayApiHost = `http://${address}:${port}`; await pluginRecipientGateway.getOrCreateWebServices(); await pluginRecipientGateway.registerWebServices(expressApp); @@ -635,7 +635,7 @@ beforeAll(async () => { const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; const { address, port } = addressInfo; - odapClientGatewayApiHost = `http://${address}:${port}`; + clientGatewayApiHost = `http://${address}:${port}`; await pluginSourceGateway.getOrCreateWebServices(); await pluginSourceGateway.registerWebServices(expressApp); @@ -646,12 +646,12 @@ 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 odapClientRequest: ClientV1Request = { + const clientRequest: ClientV1Request = { clientGatewayConfiguration: { - apiHost: odapClientGatewayApiHost, + apiHost: clientGatewayApiHost, }, serverGatewayConfiguration: { - apiHost: odapServerGatewayApiHost, + apiHost: serverGatewayApiHost, }, version: "0.0.0", loggingProfile: "dummyLoggingProfile", @@ -678,7 +678,7 @@ test("client sends rollback message at the end of the protocol", async () => { recipientLedgerAssetID: BESU_ASSET_ID, }; - const sessionID = pluginSourceGateway.configureOdapSession(odapClientRequest); + const sessionID = pluginSourceGateway.configureOdapSession(clientRequest); const transferInitializationRequest = await pluginSourceGateway.clientHelper.sendTransferInitializationRequest( @@ -869,7 +869,7 @@ test("client sends rollback message at the end of the protocol", async () => { await Servers.listen(listenOptions); - pluginSourceGateway = new FabricOdapGateway(odapClientGatewayPluginOptions); + pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); await pluginSourceGateway.registerWebServices(expressApp); await pluginSourceGateway.recoverOpenSessions(true); diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap.test.ts similarity index 92% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap.test.ts index cb0af776c8..b9231a90ba 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/integration/odap.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/integration/odap.test.ts @@ -13,7 +13,7 @@ import { } from "@hyperledger/cactus-common"; import { v4 as uuidV4 } from "uuid"; import { Configuration } from "@hyperledger/cactus-core-api"; -import { PluginOdapGateway } from "../../../main/typescript/gateway/plugin-odap-gateway"; +import { PluginSatpGateway } from "../../../main/typescript/gateway/plugin-satp-gateway"; import { GoIpfsTestContainer } from "@hyperledger/cactus-test-tooling"; import { @@ -22,8 +22,8 @@ import { } from "../../../main/typescript/public-api"; import { makeSessionDataChecks } from "../make-checks"; -import { BesuOdapGateway } from "../../../main/typescript/gateway/besu-odap-gateway"; -import { FabricOdapGateway } from "../../../main/typescript/gateway/fabric-odap-gateway"; +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"; @@ -32,8 +32,8 @@ const MAX_TIMEOUT = 5000; const logLevel: LogLevelDesc = "INFO"; -let pluginSourceGateway: PluginOdapGateway; -let pluginRecipientGateway: PluginOdapGateway; +let pluginSourceGateway: PluginSatpGateway; +let pluginRecipientGateway: PluginSatpGateway; let ipfsContainer: GoIpfsTestContainer; let ipfsServer: Server; @@ -85,7 +85,7 @@ beforeAll(async () => { test("successful run ODAP instance", async () => { const sourceGatewayConstructor = { - name: "plugin-odap-gateway#sourceGateway", + name: "plugin-satp-gateway#sourceGateway", dltIDs: ["DLT2"], instanceId: uuidV4(), ipfsPath: ipfsApiHost, @@ -93,7 +93,7 @@ test("successful run ODAP instance", async () => { serverHelper: new ServerGatewayHelper(), }; const recipientGatewayConstructor = { - name: "plugin-odap-gateway#recipientGateway", + name: "plugin-satp-gateway#recipientGateway", dltIDs: ["DLT1"], instanceId: uuidV4(), ipfsPath: ipfsApiHost, @@ -101,8 +101,8 @@ test("successful run ODAP instance", async () => { serverHelper: new ServerGatewayHelper(), }; - pluginSourceGateway = new FabricOdapGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuOdapGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); expect(pluginSourceGateway.database).not.toBeUndefined(); expect(pluginRecipientGateway.database).not.toBeUndefined(); @@ -117,7 +117,7 @@ test("successful run ODAP instance", async () => { const expiryDate = new Date(2060, 11, 24).toString(); const assetProfile: AssetProfile = { expirationDate: expiryDate }; - const odapClientRequest: ClientV1Request = { + const clientRequest: ClientV1Request = { clientGatewayConfiguration: dummyPath, serverGatewayConfiguration: dummyPath, version: "0.0.0", @@ -145,7 +145,7 @@ test("successful run ODAP instance", async () => { recipientLedgerAssetID: uuidV4(), }; - const sessionID = pluginSourceGateway.configureOdapSession(odapClientRequest); + const sessionID = pluginSourceGateway.configureOdapSession(clientRequest); const transferInitializationRequest = await pluginSourceGateway.clientHelper.sendTransferInitializationRequest( diff --git a/packages/cactus-plugin-odap-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 similarity index 95% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-create-asset.test.ts index 27bbc707ac..181bc74c42 100644 --- a/packages/cactus-plugin-odap-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 @@ -56,13 +56,13 @@ import Web3 from "web3"; import { makeSessionDataChecks } from "../make-checks"; import { - BesuOdapGateway, - IBesuOdapGatewayConstructorOptions, -} from "../../../main/typescript/gateway/besu-odap-gateway"; + BesuSatpGateway, + IBesuSatpGatewayConstructorOptions, +} from "../../../main/typescript/gateway/besu-satp-gateway"; import { - FabricOdapGateway, - IFabricOdapGatewayConstructorOptions, -} from "../../../main/typescript/gateway/fabric-odap-gateway"; + 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"; @@ -101,12 +101,12 @@ let besuKeychainId: string; let fabricConnector: PluginLedgerConnectorFabric; let besuConnector: PluginLedgerConnectorBesu; -let odapServerGatewayPluginOptions: IBesuOdapGatewayConstructorOptions; -let pluginSourceGateway: FabricOdapGateway; -let pluginRecipientGateway: BesuOdapGateway; +let serverGatewayPluginOptions: IBesuSatpGatewayConstructorOptions; +let pluginSourceGateway: FabricSatpGateway; +let pluginRecipientGateway: BesuSatpGateway; -let odapClientGatewayApiHost: string; -let odapServerGatewayApiHost: string; +let clientGatewayApiHost: string; +let serverGatewayApiHost: string; const MAX_RETRIES = 5; const MAX_TIMEOUT = 5000; @@ -116,7 +116,7 @@ const BESU_ASSET_ID = uuidv4(); const log = LoggerProvider.getOrCreate({ level: "INFO", - label: "odapTestWithLedgerConnectors", + label: "satpTestWithLedgerConnectors", }); beforeAll(async () => { @@ -560,9 +560,9 @@ beforeAll(async () => { beforeEach(async () => { { // Gateways configuration - const odapClientGatewayPluginOptions: IFabricOdapGatewayConstructorOptions = + const clientGatewayPluginOptions: IFabricSatpGatewayConstructorOptions = { - name: "cactus-plugin#odapGateway", + name: "cactus-plugin#satpGateway", dltIDs: ["DLT2"], instanceId: uuidv4(), keyPair: Secp256k1Keys.generateKeyPairsBuffer(), @@ -576,8 +576,8 @@ beforeEach(async () => { knexConfig: knexClientConnection, }; - odapServerGatewayPluginOptions = { - name: "cactus-plugin#odapGateway", + serverGatewayPluginOptions = { + name: "cactus-plugin#satpGateway", dltIDs: ["DLT1"], instanceId: uuidv4(), keyPair: Secp256k1Keys.generateKeyPairsBuffer(), @@ -591,9 +591,9 @@ beforeEach(async () => { knexConfig: knexServerConnection, }; - pluginSourceGateway = new FabricOdapGateway(odapClientGatewayPluginOptions); - pluginRecipientGateway = new BesuOdapGateway( - odapServerGatewayPluginOptions, + pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); + pluginRecipientGateway = new BesuSatpGateway( + serverGatewayPluginOptions, ); expect(pluginSourceGateway.database).not.toBeUndefined(); @@ -618,7 +618,7 @@ beforeEach(async () => { const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; const { address, port } = addressInfo; - odapServerGatewayApiHost = `http://${address}:${port}`; + serverGatewayApiHost = `http://${address}:${port}`; await pluginRecipientGateway.getOrCreateWebServices(); await pluginRecipientGateway.registerWebServices(expressApp); @@ -637,7 +637,7 @@ beforeEach(async () => { const addressInfo = (await Servers.listen(listenOptions)) as AddressInfo; const { address, port } = addressInfo; - odapClientGatewayApiHost = `http://${address}:${port}`; + clientGatewayApiHost = `http://${address}:${port}`; await pluginSourceGateway.getOrCreateWebServices(); await pluginSourceGateway.registerWebServices(expressApp); @@ -648,12 +648,12 @@ test("server gateway crashes after creating besu asset", async () => { const expiryDate = new Date(2060, 11, 24).toString(); const assetProfile: AssetProfile = { expirationDate: expiryDate }; - const odapClientRequest: ClientV1Request = { + const clientRequest: ClientV1Request = { clientGatewayConfiguration: { - apiHost: odapClientGatewayApiHost, + apiHost: clientGatewayApiHost, }, serverGatewayConfiguration: { - apiHost: odapServerGatewayApiHost, + apiHost: serverGatewayApiHost, }, version: "0.0.0", loggingProfile: "dummyLoggingProfile", @@ -680,7 +680,7 @@ test("server gateway crashes after creating besu asset", async () => { recipientLedgerAssetID: BESU_ASSET_ID, }; - const sessionID = pluginSourceGateway.configureOdapSession(odapClientRequest); + const sessionID = pluginSourceGateway.configureOdapSession(clientRequest); const transferInitializationRequest = await pluginSourceGateway.clientHelper.sendTransferInitializationRequest( @@ -856,7 +856,7 @@ test("server gateway crashes after creating besu asset", async () => { await Servers.listen(listenOptions); - pluginRecipientGateway = new BesuOdapGateway(odapServerGatewayPluginOptions); + pluginRecipientGateway = new BesuSatpGateway(serverGatewayPluginOptions); await pluginRecipientGateway.registerWebServices(expressApp); // client gateway self-healed and is back online diff --git a/packages/cactus-plugin-odap-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 similarity index 85% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/integration/server-crash-after-transfer-initiation.test.ts index bc5a9a07bb..9dd6a11f1f 100644 --- a/packages/cactus-plugin-odap-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 @@ -21,13 +21,13 @@ import { } from "../../../main/typescript/public-api"; import { makeSessionDataChecks } from "../make-checks"; import { - IFabricOdapGatewayConstructorOptions, - FabricOdapGateway, -} from "../../../main/typescript/gateway/fabric-odap-gateway"; + IFabricSatpGatewayConstructorOptions, + FabricSatpGateway, +} from "../../../main/typescript/gateway/fabric-satp-gateway"; import { - IBesuOdapGatewayConstructorOptions, - BesuOdapGateway, -} from "../../../main/typescript/gateway/besu-odap-gateway"; + 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"; @@ -41,10 +41,10 @@ const BESU_ASSET_ID = uuidv4(); const logLevel: LogLevelDesc = "INFO"; -let odapClientGatewayPluginOptions: IFabricOdapGatewayConstructorOptions; -let odapServerGatewayPluginOptions: IBesuOdapGatewayConstructorOptions; -let pluginSourceGateway: FabricOdapGateway; -let pluginRecipientGateway: BesuOdapGateway; +let clientGatewayPluginOptions: IFabricSatpGatewayConstructorOptions; +let serverGatewayPluginOptions: IBesuSatpGatewayConstructorOptions; +let pluginSourceGateway: FabricSatpGateway; +let pluginRecipientGateway: BesuSatpGateway; let ipfsContainer: GoIpfsTestContainer; let ipfsApiHost: string; @@ -53,10 +53,10 @@ let ipfsServer: Server; let sourceGatewayServer: Server; let recipientGatewayserver: Server; -let odapServerGatewayApiHost: string; -let odapClientGatewayApiHost: string; +let serverGatewayApiHost: string; +let clientGatewayApiHost: string; -let odapClientRequest: ClientV1Request; +let clientRequest: ClientV1Request; let serverExpressApp: Express; let serverListenOptions: IListenOptions; @@ -111,8 +111,8 @@ beforeAll(async () => { } { // Server Gateway configuration - odapServerGatewayPluginOptions = { - name: "cactus-plugin#odapGateway", + serverGatewayPluginOptions = { + name: "cactus-plugin#satpGateway", dltIDs: ["DLT1"], instanceId: uuidv4(), ipfsPath: ipfsApiHost, @@ -135,10 +135,10 @@ beforeAll(async () => { )) as AddressInfo; const { address, port } = addressInfo; - odapServerGatewayApiHost = `http://${address}:${port}`; + serverGatewayApiHost = `http://${address}:${port}`; - pluginRecipientGateway = new BesuOdapGateway( - odapServerGatewayPluginOptions, + pluginRecipientGateway = new BesuSatpGateway( + serverGatewayPluginOptions, ); expect(pluginRecipientGateway.database).not.toBeUndefined(); @@ -150,8 +150,8 @@ beforeAll(async () => { } { // Client Gateway configuration - odapClientGatewayPluginOptions = { - name: "cactus-plugin#odapGateway", + clientGatewayPluginOptions = { + name: "cactus-plugin#satpGateway", dltIDs: ["DLT2"], instanceId: uuidv4(), ipfsPath: ipfsApiHost, @@ -175,9 +175,9 @@ beforeAll(async () => { )) as AddressInfo; const { address, port } = addressInfo; - odapClientGatewayApiHost = `http://${address}:${port}`; + clientGatewayApiHost = `http://${address}:${port}`; - pluginSourceGateway = new FabricOdapGateway(odapClientGatewayPluginOptions); + pluginSourceGateway = new FabricSatpGateway(clientGatewayPluginOptions); if (pluginSourceGateway.database == undefined) { throw new Error("Database is not correctly initialized"); @@ -191,12 +191,12 @@ beforeAll(async () => { const expiryDate = new Date(2060, 11, 24).toString(); const assetProfile: AssetProfile = { expirationDate: expiryDate }; - odapClientRequest = { + clientRequest = { clientGatewayConfiguration: { - apiHost: odapClientGatewayApiHost, + apiHost: clientGatewayApiHost, }, serverGatewayConfiguration: { - apiHost: odapServerGatewayApiHost, + apiHost: serverGatewayApiHost, }, version: "0.0.0", loggingProfile: "dummyLoggingProfile", @@ -226,7 +226,7 @@ beforeAll(async () => { }); test("server gateway crashes after transfer initiation flow", async () => { - const sessionID = pluginSourceGateway.configureOdapSession(odapClientRequest); + const sessionID = pluginSourceGateway.configureOdapSession(clientRequest); const transferInitializationRequest = await pluginSourceGateway.clientHelper.sendTransferInitializationRequest( @@ -260,7 +260,7 @@ test("server gateway crashes after transfer initiation flow", async () => { await Servers.listen(listenOptions); - pluginRecipientGateway = new BesuOdapGateway(odapServerGatewayPluginOptions); + pluginRecipientGateway = new BesuSatpGateway(serverGatewayPluginOptions); await pluginRecipientGateway.registerWebServices(serverExpressApp); // server gateway self-healed and is back online diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/knex.config.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/knex.config.ts similarity index 54% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/knex.config.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/knex.config.ts index b1b4e7668c..fa4578bd05 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/knex.config.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/knex.config.ts @@ -1,10 +1,10 @@ export const knexClientConnection = { client: "sqlite3", connection: { - filename: "./packages/cactus-plugin-odap-hermes/knex/.dev.client.sqlite3", + filename: "./packages/cactus-plugin-satp-hermes/knex/.dev.client.sqlite3", }, migrations: { - directory: "./packages/cactus-plugin-odap-hermes/knex/migrations", + directory: "./packages/cactus-plugin-satp-hermes/knex/migrations", }, useNullAsDefault: true, }; @@ -12,10 +12,10 @@ export const knexClientConnection = { export const knexServerConnection = { client: "sqlite3", connection: { - filename: "./packages/cactus-plugin-odap-hermes/knex/.dev.server.sqlite3", + filename: "./packages/cactus-plugin-satp-hermes/knex/.dev.server.sqlite3", }, migrations: { - directory: "./packages/cactus-plugin-odap-hermes/knex/migrations", + directory: "./packages/cactus-plugin-satp-hermes/knex/migrations", }, useNullAsDefault: true, }; diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/make-checks.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/make-checks.ts similarity index 82% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/make-checks.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/make-checks.ts index 6bb58d30e9..594542cd01 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/make-checks.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/make-checks.ts @@ -1,8 +1,8 @@ -import { PluginOdapGateway } from "../../main/typescript/gateway/plugin-odap-gateway"; +import { PluginSatpGateway } from "../../main/typescript/gateway/plugin-satp-gateway"; export async function makeSessionDataChecks( - pluginSourceGateway: PluginOdapGateway, - pluginRecipientGateway: PluginOdapGateway, + pluginSourceGateway: PluginSatpGateway, + pluginRecipientGateway: PluginSatpGateway, sessionId: string, ): Promise { const clientSessionData = pluginSourceGateway.sessions.get(sessionId); @@ -160,122 +160,122 @@ export async function makeSessionDataChecks( await expect( pluginSourceGateway.getLogFromDatabase( - PluginOdapGateway.getOdapLogKey(sessionId, "init", "validate"), + PluginSatpGateway.getOdapLogKey(sessionId, "init", "validate"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginOdapGateway.getOdapLogKey(sessionId, "exec", "validate"), + PluginSatpGateway.getOdapLogKey(sessionId, "exec", "validate"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginOdapGateway.getOdapLogKey(sessionId, "done", "validate"), + PluginSatpGateway.getOdapLogKey(sessionId, "done", "validate"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginOdapGateway.getOdapLogKey(sessionId, "ack", "validate"), + PluginSatpGateway.getOdapLogKey(sessionId, "ack", "validate"), ), ).resolves.not.toBeUndefined(); await expect( pluginSourceGateway.getLogFromDatabase( - PluginOdapGateway.getOdapLogKey(sessionId, "init", "commence"), + PluginSatpGateway.getOdapLogKey(sessionId, "init", "commence"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginOdapGateway.getOdapLogKey(sessionId, "exec", "commence"), + PluginSatpGateway.getOdapLogKey(sessionId, "exec", "commence"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginOdapGateway.getOdapLogKey(sessionId, "done", "commence"), + PluginSatpGateway.getOdapLogKey(sessionId, "done", "commence"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginOdapGateway.getOdapLogKey(sessionId, "ack", "commence"), + PluginSatpGateway.getOdapLogKey(sessionId, "ack", "commence"), ), ).resolves.not.toBeUndefined(); await expect( pluginSourceGateway.getLogFromDatabase( - PluginOdapGateway.getOdapLogKey(sessionId, "init", "lock"), + PluginSatpGateway.getOdapLogKey(sessionId, "init", "lock"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginOdapGateway.getOdapLogKey(sessionId, "exec", "lock"), + PluginSatpGateway.getOdapLogKey(sessionId, "exec", "lock"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginOdapGateway.getOdapLogKey(sessionId, "done", "lock"), + PluginSatpGateway.getOdapLogKey(sessionId, "done", "lock"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginOdapGateway.getOdapLogKey(sessionId, "ack", "lock"), + PluginSatpGateway.getOdapLogKey(sessionId, "ack", "lock"), ), ).resolves.not.toBeUndefined(); await expect( pluginSourceGateway.getLogFromDatabase( - PluginOdapGateway.getOdapLogKey(sessionId, "init", "prepare"), + PluginSatpGateway.getOdapLogKey(sessionId, "init", "prepare"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginOdapGateway.getOdapLogKey(sessionId, "exec", "prepare"), + PluginSatpGateway.getOdapLogKey(sessionId, "exec", "prepare"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginOdapGateway.getOdapLogKey(sessionId, "done", "prepare"), + PluginSatpGateway.getOdapLogKey(sessionId, "done", "prepare"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginOdapGateway.getOdapLogKey(sessionId, "ack", "prepare"), + PluginSatpGateway.getOdapLogKey(sessionId, "ack", "prepare"), ), ).resolves.not.toBeUndefined(); await expect( pluginSourceGateway.getLogFromDatabase( - PluginOdapGateway.getOdapLogKey(sessionId, "init", "final"), + PluginSatpGateway.getOdapLogKey(sessionId, "init", "final"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginOdapGateway.getOdapLogKey(sessionId, "exec", "final"), + PluginSatpGateway.getOdapLogKey(sessionId, "exec", "final"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginOdapGateway.getOdapLogKey(sessionId, "done", "final"), + PluginSatpGateway.getOdapLogKey(sessionId, "done", "final"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginOdapGateway.getOdapLogKey(sessionId, "ack", "final"), + PluginSatpGateway.getOdapLogKey(sessionId, "ack", "final"), ), ).resolves.not.toBeUndefined(); await expect( pluginSourceGateway.getLogFromDatabase( - PluginOdapGateway.getOdapLogKey(sessionId, "init", "complete"), + PluginSatpGateway.getOdapLogKey(sessionId, "init", "complete"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginOdapGateway.getOdapLogKey(sessionId, "exec", "complete"), + PluginSatpGateway.getOdapLogKey(sessionId, "exec", "complete"), ), ).resolves.not.toBeUndefined(); await expect( pluginRecipientGateway.getLogFromDatabase( - PluginOdapGateway.getOdapLogKey(sessionId, "done", "complete"), + PluginSatpGateway.getOdapLogKey(sessionId, "done", "complete"), ), ).resolves.not.toBeUndefined(); } diff --git a/packages/cactus-plugin-odap-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 similarity index 91% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/unit/client/commit-final.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-final.test.ts index 1c0f150c52..40a7f370e6 100644 --- a/packages/cactus-plugin-odap-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 @@ -5,8 +5,8 @@ import { v4 as uuidv4 } from "uuid"; import http, { Server } from "http"; import { OdapMessageType, - PluginOdapGateway, -} from "../../../../main/typescript/gateway/plugin-odap-gateway"; + PluginSatpGateway, +} from "../../../../main/typescript/gateway/plugin-satp-gateway"; import { DefaultApi as ObjectStoreIpfsApi } from "@hyperledger/cactus-plugin-object-store-ipfs"; import { CommitFinalV1Response, @@ -24,8 +24,8 @@ import { GoIpfsTestContainer } from "@hyperledger/cactus-test-tooling"; import express from "express"; import { AddressInfo } from "net"; -import { FabricOdapGateway } from "../../../../main/typescript/gateway/fabric-odap-gateway"; -import { BesuOdapGateway } from "../../../../main/typescript/gateway/besu-odap-gateway"; +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"; @@ -39,8 +39,8 @@ const COMMIT_ACK_CLAIM = "dummyCommitAckClaim"; let sourceGatewayConstructor; let recipientGatewayConstructor; -let pluginSourceGateway: PluginOdapGateway; -let pluginRecipientGateway: PluginOdapGateway; +let pluginSourceGateway: PluginSatpGateway; +let pluginRecipientGateway: PluginSatpGateway; let sequenceNumber: number; let sessionID: string; let step: number; @@ -95,7 +95,7 @@ beforeAll(async () => { beforeEach(async () => { sourceGatewayConstructor = { - name: "plugin-odap-gateway#sourceGateway", + name: "plugin-satp-gateway#sourceGateway", dltIDs: ["DLT2"], instanceId: uuidv4(), ipfsPath: ipfsApiHost, @@ -103,7 +103,7 @@ beforeEach(async () => { serverHelper: new ServerGatewayHelper(), }; recipientGatewayConstructor = { - name: "plugin-odap-gateway#recipientGateway", + name: "plugin-satp-gateway#recipientGateway", dltIDs: ["DLT1"], instanceId: uuidv4(), ipfsPath: ipfsApiHost, @@ -111,8 +111,8 @@ beforeEach(async () => { serverHelper: new ServerGatewayHelper(), }; - pluginSourceGateway = new FabricOdapGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuOdapGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); if ( pluginSourceGateway.database == undefined || @@ -147,7 +147,7 @@ beforeEach(async () => { pluginSourceGateway.sessions.set(sessionID, sessionData); - await pluginRecipientGateway.storeOdapProof({ + await pluginRecipientGateway.storeProof({ sessionID: sessionID, type: "proof", operation: "create", @@ -184,7 +184,7 @@ test("valid commit final response", async () => { sequenceNumber: sequenceNumber, }; - commitFinalResponse.signature = PluginOdapGateway.bufArray2HexStr( + commitFinalResponse.signature = PluginSatpGateway.bufArray2HexStr( await pluginRecipientGateway.sign(JSON.stringify(commitFinalResponse)), ); @@ -221,7 +221,7 @@ test("commit final response invalid because of wrong previous message hash", asy sequenceNumber: sequenceNumber, }; - commitFinalResponse.signature = PluginOdapGateway.bufArray2HexStr( + commitFinalResponse.signature = PluginSatpGateway.bufArray2HexStr( await pluginRecipientGateway.sign(JSON.stringify(commitFinalResponse)), ); @@ -249,7 +249,7 @@ test("commit final response invalid because of wrong signature", async () => { sequenceNumber: sequenceNumber, }; - commitFinalResponse.signature = PluginOdapGateway.bufArray2HexStr( + commitFinalResponse.signature = PluginSatpGateway.bufArray2HexStr( await pluginRecipientGateway.sign("somethingWrong"), ); diff --git a/packages/cactus-plugin-odap-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 similarity index 88% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/unit/client/commit-preparation.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/commit-preparation.test.ts index c5ce9c80d3..bd864f05c2 100644 --- a/packages/cactus-plugin-odap-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 @@ -3,14 +3,14 @@ import { SHA256 } from "crypto-js"; import { v4 as uuidV4 } from "uuid"; import { OdapMessageType, - PluginOdapGateway, -} from "../../../../main/typescript/gateway/plugin-odap-gateway"; + PluginSatpGateway, +} from "../../../../main/typescript/gateway/plugin-satp-gateway"; import { CommitPreparationV1Response, SessionData, } from "../../../../main/typescript/public-api"; -import { BesuOdapGateway } from "../../../../main/typescript/gateway/besu-odap-gateway"; -import { FabricOdapGateway } from "../../../../main/typescript/gateway/fabric-odap-gateway"; +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"; @@ -22,30 +22,30 @@ const COMMIT_PREPARATION_REQUEST_MESSAGE_HASH = let sourceGatewayConstructor; let recipientGatewayConstructor; -let pluginSourceGateway: PluginOdapGateway; -let pluginRecipientGateway: PluginOdapGateway; +let pluginSourceGateway: PluginSatpGateway; +let pluginRecipientGateway: PluginSatpGateway; let sequenceNumber: number; let sessionID: string; let step: number; beforeEach(async () => { sourceGatewayConstructor = { - name: "plugin-odap-gateway#sourceGateway", + name: "plugin-satp-gateway#sourceGateway", dltIDs: ["DLT2"], instanceId: uuidV4(), clientHelper: new ClientGatewayHelper(), serverHelper: new ServerGatewayHelper(), }; recipientGatewayConstructor = { - name: "plugin-odap-gateway#recipientGateway", + name: "plugin-satp-gateway#recipientGateway", dltIDs: ["DLT1"], instanceId: uuidV4(), clientHelper: new ClientGatewayHelper(), serverHelper: new ServerGatewayHelper(), }; - pluginSourceGateway = new FabricOdapGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuOdapGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); if ( pluginSourceGateway.database == undefined || @@ -92,7 +92,7 @@ test("valid commit preparation response", async () => { sequenceNumber: sequenceNumber, }; - commitPreparationResponse.signature = PluginOdapGateway.bufArray2HexStr( + commitPreparationResponse.signature = PluginSatpGateway.bufArray2HexStr( await pluginRecipientGateway.sign( JSON.stringify(commitPreparationResponse), ), @@ -131,7 +131,7 @@ test("commit preparation response invalid because of wrong previous message hash sequenceNumber: sequenceNumber, }; - commitPreparationResponse.signature = PluginOdapGateway.bufArray2HexStr( + commitPreparationResponse.signature = PluginSatpGateway.bufArray2HexStr( await pluginRecipientGateway.sign( JSON.stringify(commitPreparationResponse), ), @@ -163,7 +163,7 @@ test("commit preparation response invalid because of wrong signature", async () sequenceNumber: sequenceNumber, }; - commitPreparationResponse.signature = PluginOdapGateway.bufArray2HexStr( + commitPreparationResponse.signature = PluginSatpGateway.bufArray2HexStr( await pluginRecipientGateway.sign("somethingWrong"), ); diff --git a/packages/cactus-plugin-odap-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 similarity index 88% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/unit/client/lock-evidence.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/lock-evidence.test.ts index 24e852dd3c..8669d9029b 100644 --- a/packages/cactus-plugin-odap-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 @@ -3,14 +3,14 @@ import { SHA256 } from "crypto-js"; import { v4 as uuidV4 } from "uuid"; import { OdapMessageType, - PluginOdapGateway, -} from "../../../../main/typescript/gateway/plugin-odap-gateway"; + PluginSatpGateway, +} from "../../../../main/typescript/gateway/plugin-satp-gateway"; import { LockEvidenceV1Response, SessionData, } from "../../../../main/typescript/public-api"; -import { BesuOdapGateway } from "../../../../main/typescript/gateway/besu-odap-gateway"; -import { FabricOdapGateway } from "../../../../main/typescript/gateway/fabric-odap-gateway"; +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"; @@ -22,30 +22,30 @@ const LOCK_EVIDENCE_REQUEST_MESSAGE_HASH = let sourceGatewayConstructor; let recipientGatewayConstructor; -let pluginSourceGateway: PluginOdapGateway; -let pluginRecipientGateway: PluginOdapGateway; +let pluginSourceGateway: PluginSatpGateway; +let pluginRecipientGateway: PluginSatpGateway; let sequenceNumber: number; let sessionID: string; let step: number; beforeEach(async () => { sourceGatewayConstructor = { - name: "plugin-odap-gateway#sourceGateway", + name: "plugin-satp-gateway#sourceGateway", dltIDs: ["DLT2"], instanceId: uuidV4(), clientHelper: new ClientGatewayHelper(), serverHelper: new ServerGatewayHelper(), }; recipientGatewayConstructor = { - name: "plugin-odap-gateway#recipientGateway", + name: "plugin-satp-gateway#recipientGateway", dltIDs: ["DLT1"], instanceId: uuidV4(), clientHelper: new ClientGatewayHelper(), serverHelper: new ServerGatewayHelper(), }; - pluginSourceGateway = new FabricOdapGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuOdapGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); if ( pluginSourceGateway.database == undefined || @@ -92,7 +92,7 @@ test("valid lock evidence response", async () => { sequenceNumber: sequenceNumber, }; - lockEvidenceResponse.signature = PluginOdapGateway.bufArray2HexStr( + lockEvidenceResponse.signature = PluginSatpGateway.bufArray2HexStr( await pluginRecipientGateway.sign(JSON.stringify(lockEvidenceResponse)), ); @@ -127,7 +127,7 @@ test("lock evidence response invalid because of wrong previous message hash", as sequenceNumber: sequenceNumber, }; - lockEvidenceResponse.signature = PluginOdapGateway.bufArray2HexStr( + lockEvidenceResponse.signature = PluginSatpGateway.bufArray2HexStr( await pluginRecipientGateway.sign(JSON.stringify(lockEvidenceResponse)), ); @@ -154,7 +154,7 @@ test("lock evidence response invalid because of wrong signature", async () => { sequenceNumber: sequenceNumber, }; - lockEvidenceResponse.signature = PluginOdapGateway.bufArray2HexStr( + lockEvidenceResponse.signature = PluginSatpGateway.bufArray2HexStr( await pluginRecipientGateway.sign("somethingWrong"), ); diff --git a/packages/cactus-plugin-odap-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 similarity index 89% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/unit/client/transfer-commence.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-commence.test.ts index 9af5a7a286..5f09feeb35 100644 --- a/packages/cactus-plugin-odap-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 @@ -3,15 +3,15 @@ import { SHA256 } from "crypto-js"; import { v4 as uuidV4 } from "uuid"; import { OdapMessageType, - PluginOdapGateway, -} from "../../../../main/typescript/gateway/plugin-odap-gateway"; + PluginSatpGateway, +} from "../../../../main/typescript/gateway/plugin-satp-gateway"; import { AssetProfile, SessionData, TransferCommenceV1Response, } from "../../../../main/typescript/public-api"; -import { BesuOdapGateway } from "../../../../main/typescript/gateway/besu-odap-gateway"; -import { FabricOdapGateway } from "../../../../main/typescript/gateway/fabric-odap-gateway"; +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"; @@ -22,30 +22,30 @@ const COMMENCE_REQUEST_MESSAGE_HASH = "dummyCommenceRequestMessageHash"; let sourceGatewayConstructor; let recipientGatewayConstructor; -let pluginSourceGateway: PluginOdapGateway; -let pluginRecipientGateway: PluginOdapGateway; +let pluginSourceGateway: PluginSatpGateway; +let pluginRecipientGateway: PluginSatpGateway; let sequenceNumber: number; let sessionID: string; let step: number; beforeEach(async () => { sourceGatewayConstructor = { - name: "plugin-odap-gateway#sourceGateway", + name: "plugin-satp-gateway#sourceGateway", dltIDs: ["DLT2"], instanceId: uuidV4(), clientHelper: new ClientGatewayHelper(), serverHelper: new ServerGatewayHelper(), }; recipientGatewayConstructor = { - name: "plugin-odap-gateway#recipientGateway", + name: "plugin-satp-gateway#recipientGateway", dltIDs: ["DLT1"], instanceId: uuidV4(), clientHelper: new ClientGatewayHelper(), serverHelper: new ServerGatewayHelper(), }; - pluginSourceGateway = new FabricOdapGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuOdapGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); if ( pluginSourceGateway.database == undefined || @@ -92,7 +92,7 @@ test("valid transfer commence response", async () => { sequenceNumber: sequenceNumber, }; - transferCommenceResponse.signature = PluginOdapGateway.bufArray2HexStr( + transferCommenceResponse.signature = PluginSatpGateway.bufArray2HexStr( await pluginRecipientGateway.sign(JSON.stringify(transferCommenceResponse)), ); @@ -129,7 +129,7 @@ test("transfer commence response invalid because of wrong previous message hash" sequenceNumber: sequenceNumber, }; - transferCommenceResponse.signature = PluginOdapGateway.bufArray2HexStr( + transferCommenceResponse.signature = PluginSatpGateway.bufArray2HexStr( await pluginRecipientGateway.sign(JSON.stringify(transferCommenceResponse)), ); @@ -159,7 +159,7 @@ test("transfer commence response invalid because of wrong signature", async () = sequenceNumber: sequenceNumber, }; - transferCommenceResponse.signature = PluginOdapGateway.bufArray2HexStr( + transferCommenceResponse.signature = PluginSatpGateway.bufArray2HexStr( await pluginRecipientGateway.sign("somethingWrong"), ); diff --git a/packages/cactus-plugin-odap-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 similarity index 90% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/unit/client/transfer-initialization.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/unit/client/transfer-initialization.test.ts index 4e6dc7965c..660429c239 100644 --- a/packages/cactus-plugin-odap-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 @@ -3,15 +3,15 @@ import { SHA256 } from "crypto-js"; import { v4 as uuidV4 } from "uuid"; import { OdapMessageType, - PluginOdapGateway, -} from "../../../../main/typescript/gateway/plugin-odap-gateway"; + PluginSatpGateway, +} from "../../../../main/typescript/gateway/plugin-satp-gateway"; import { TransferInitializationV1Response, SessionData, AssetProfile, } from "../../../../main/typescript/public-api"; -import { BesuOdapGateway } from "../../../../main/typescript/gateway/besu-odap-gateway"; -import { FabricOdapGateway } from "../../../../main/typescript/gateway/fabric-odap-gateway"; +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"; @@ -23,30 +23,30 @@ const INITIALIZATION_REQUEST_MESSAGE_HASH = let sourceGatewayConstructor; let recipientGatewayConstructor; -let pluginSourceGateway: PluginOdapGateway; -let pluginRecipientGateway: PluginOdapGateway; +let pluginSourceGateway: PluginSatpGateway; +let pluginRecipientGateway: PluginSatpGateway; let sequenceNumber: number; let sessionID: string; let step: number; beforeEach(async () => { sourceGatewayConstructor = { - name: "plugin-odap-gateway#sourceGateway", + name: "plugin-satp-gateway#sourceGateway", dltIDs: ["DLT2"], instanceId: uuidV4(), clientHelper: new ClientGatewayHelper(), serverHelper: new ServerGatewayHelper(), }; recipientGatewayConstructor = { - name: "plugin-odap-gateway#recipientGateway", + name: "plugin-satp-gateway#recipientGateway", dltIDs: ["DLT1"], instanceId: uuidV4(), clientHelper: new ClientGatewayHelper(), serverHelper: new ServerGatewayHelper(), }; - pluginSourceGateway = new FabricOdapGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuOdapGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); if ( pluginSourceGateway.database == undefined || @@ -95,7 +95,7 @@ test("valid transfer initiation response", async () => { backupGatewaysAllowed: [], }; - initializationResponseMessage.signature = PluginOdapGateway.bufArray2HexStr( + initializationResponseMessage.signature = PluginSatpGateway.bufArray2HexStr( await pluginRecipientGateway.sign( JSON.stringify(initializationResponseMessage), ), @@ -142,7 +142,7 @@ test("transfer initiation response invalid because of wrong previous message has backupGatewaysAllowed: [], }; - initializationResponseMessage.signature = PluginOdapGateway.bufArray2HexStr( + initializationResponseMessage.signature = PluginSatpGateway.bufArray2HexStr( await pluginSourceGateway.sign( JSON.stringify(initializationResponseMessage), ), @@ -176,7 +176,7 @@ test("transfer initiation response invalid because it does not match transfer in backupGatewaysAllowed: [], }; - initializationResponseMessage.signature = PluginOdapGateway.bufArray2HexStr( + initializationResponseMessage.signature = PluginSatpGateway.bufArray2HexStr( await pluginSourceGateway.sign( JSON.stringify(initializationResponseMessage), ), diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/logging.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts similarity index 85% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/logging.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts index 64e509d43e..68123bd74f 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/logging.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/logging.test.ts @@ -14,22 +14,22 @@ import { } from "@hyperledger/cactus-common"; import { v4 as uuidV4 } from "uuid"; import { Configuration } from "@hyperledger/cactus-core-api"; -import { PluginOdapGateway } from "../../../../main/typescript/gateway/plugin-odap-gateway"; +import { PluginSatpGateway } from "../../../../main/typescript/gateway/plugin-satp-gateway"; import { GoIpfsTestContainer } from "@hyperledger/cactus-test-tooling"; import { - OdapLocalLog, + LocalLog, SessionData, } from "../../../../main/typescript/public-api"; import { SHA256 } from "crypto-js"; import { - BesuOdapGateway, - IBesuOdapGatewayConstructorOptions, -} from "../../../../main/typescript/gateway/besu-odap-gateway"; + BesuSatpGateway, + IBesuSatpGatewayConstructorOptions, +} from "../../../../main/typescript/gateway/besu-satp-gateway"; import { - FabricOdapGateway, - IFabricOdapGatewayConstructorOptions, -} from "../../../../main/typescript/gateway/fabric-odap-gateway"; + 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"; @@ -37,11 +37,11 @@ import { knexClientConnection, knexServerConnection } from "../../knex.config"; const logLevel: LogLevelDesc = "TRACE"; -let sourceGatewayConstructor: IFabricOdapGatewayConstructorOptions; -let recipientGatewayConstructor: IBesuOdapGatewayConstructorOptions; +let sourceGatewayConstructor: IFabricSatpGatewayConstructorOptions; +let recipientGatewayConstructor: IBesuSatpGatewayConstructorOptions; -let pluginSourceGateway: PluginOdapGateway; -let pluginRecipientGateway: PluginOdapGateway; +let pluginSourceGateway: PluginSatpGateway; +let pluginRecipientGateway: PluginSatpGateway; let sessionID: string; let step: number; let type: string; @@ -49,10 +49,10 @@ let type2: string; let type3: string; let type4: string; let operation: string; -let odapLog: OdapLocalLog; -let odapLog2: OdapLocalLog; -let odapLog3: OdapLocalLog; -let odapLog4: OdapLocalLog; +let odapLog: LocalLog; +let odapLog2: LocalLog; +let odapLog3: LocalLog; +let odapLog4: LocalLog; let sessionData: SessionData; let ipfsContainer: GoIpfsTestContainer; @@ -103,7 +103,7 @@ beforeAll(async () => { await pluginIpfs.registerWebServices(expressApp); sourceGatewayConstructor = { - name: "plugin-odap-gateway#sourceGateway", + name: "plugin-satp-gateway#sourceGateway", dltIDs: ["DLT2"], instanceId: uuidV4(), ipfsPath: ipfsApiHost, @@ -113,7 +113,7 @@ beforeAll(async () => { knexConfig: knexClientConnection, }; recipientGatewayConstructor = { - name: "plugin-odap-gateway#recipientGateway", + name: "plugin-satp-gateway#recipientGateway", dltIDs: ["DLT1"], instanceId: uuidV4(), ipfsPath: ipfsApiHost, @@ -129,8 +129,8 @@ beforeEach(async () => { type = "type1"; operation = "operation1"; - pluginSourceGateway = new FabricOdapGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuOdapGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); sessionData = { id: sessionID, @@ -168,20 +168,20 @@ afterEach(() => { }); test("successful translation of log keys", async () => { - expect(PluginOdapGateway.getOdapLogKey(sessionID, type, operation)).toBe( + expect(PluginSatpGateway.getOdapLogKey(sessionID, type, operation)).toBe( `${sessionID}-${type}-${operation}`, ); }); test("successful logging of proof to ipfs and sqlite", async () => { const claim = "claim"; - const odapLogKey = PluginOdapGateway.getOdapLogKey( + const odapLogKey = PluginSatpGateway.getOdapLogKey( sessionID, "proof", "lock", ); - await pluginSourceGateway.storeOdapProof({ + await pluginSourceGateway.storeProof({ sessionID, type: "proof", operation: "lock", @@ -210,13 +210,13 @@ test("successful logging of proof to ipfs and sqlite", async () => { }); test("successful logging to ipfs and sqlite", async () => { - const odapLogKey = PluginOdapGateway.getOdapLogKey( + const odapLogKey = PluginSatpGateway.getOdapLogKey( sessionID, type, operation, ); - await pluginSourceGateway.storeOdapLog(odapLog); + await pluginSourceGateway.storeLog(odapLog); const retrievedLogIPFS = await pluginSourceGateway.getLogFromIPFS(odapLogKey); const retrievedLogDB = @@ -275,8 +275,8 @@ test("successful retrieval of last log", async () => { data: JSON.stringify(sessionData), }; - await pluginSourceGateway.storeOdapLog(odapLog2); - await pluginSourceGateway.storeOdapLog(odapLog3); + await pluginSourceGateway.storeLog(odapLog2); + await pluginSourceGateway.storeLog(odapLog3); const lastLog = await pluginSourceGateway.getLastLogFromDatabase(sessionID); @@ -298,7 +298,7 @@ test("successful retrieval of last log", async () => { expect(lastLog.operation).toBe(odapLog3.operation); expect(lastLog.sessionID).toBe(odapLog3.sessionID); expect(lastLog.key).toBe( - PluginOdapGateway.getOdapLogKey(sessionID, type3, operation), + PluginSatpGateway.getOdapLogKey(sessionID, type3, operation), ); }); @@ -320,13 +320,13 @@ test("successful retrieval of logs more recent than another log", async () => { data: JSON.stringify(sessionData), }; - await pluginSourceGateway.storeOdapLog(odapLog2); + await pluginSourceGateway.storeLog(odapLog2); const referenceTimestamp = Date.now().toString(); await new Promise((resolve) => setTimeout(resolve, 1000)); - await pluginSourceGateway.storeOdapLog(odapLog); - await pluginSourceGateway.storeOdapLog(odapLog3); + await pluginSourceGateway.storeLog(odapLog); + await pluginSourceGateway.storeLog(odapLog3); const moreRecentLogs = await pluginSourceGateway.getLogsMoreRecentThanTimestamp( @@ -353,7 +353,7 @@ test("successful retrieval of logs more recent than another log", async () => { expect(moreRecentLogs[0].operation).toBe(odapLog.operation); expect(moreRecentLogs[0].sessionID).toBe(odapLog.sessionID); expect(moreRecentLogs[0].key).toBe( - PluginOdapGateway.getOdapLogKey(sessionID, type, operation), + PluginSatpGateway.getOdapLogKey(sessionID, type, operation), ); expect(moreRecentLogs[1].type).toBe(odapLog3.type); @@ -365,7 +365,7 @@ test("successful retrieval of logs more recent than another log", async () => { expect(moreRecentLogs[1].operation).toBe(odapLog3.operation); expect(moreRecentLogs[1].sessionID).toBe(odapLog3.sessionID); expect(moreRecentLogs[1].key).toBe( - PluginOdapGateway.getOdapLogKey(sessionID, type3, operation), + PluginSatpGateway.getOdapLogKey(sessionID, type3, operation), ); }); @@ -417,14 +417,14 @@ test("successful recover of sessions after crash", async () => { pluginSourceGateway.sessions.set(newSessionID, data); - await pluginSourceGateway.storeOdapLog(odapLog); - await pluginSourceGateway.storeOdapLog(odapLog3); - await pluginSourceGateway.storeOdapLog(odapLog2); - await pluginSourceGateway.storeOdapLog(odapLog4); + await pluginSourceGateway.storeLog(odapLog); + await pluginSourceGateway.storeLog(odapLog3); + await pluginSourceGateway.storeLog(odapLog2); + await pluginSourceGateway.storeLog(odapLog4); // simulate the crash of one gateway pluginSourceGateway.database?.destroy(); - const newPluginSourceGateway = new FabricOdapGateway( + const newPluginSourceGateway = new FabricSatpGateway( sourceGatewayConstructor, ); diff --git a/packages/cactus-plugin-odap-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 similarity index 87% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-success.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-success.test.ts index a58da38eeb..2cca94f454 100644 --- a/packages/cactus-plugin-odap-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 @@ -13,7 +13,7 @@ import { } from "@hyperledger/cactus-common"; import { v4 as uuidV4 } from "uuid"; import { Configuration } from "@hyperledger/cactus-core-api"; -import { PluginOdapGateway } from "../../../../main/typescript/gateway/plugin-odap-gateway"; +import { PluginSatpGateway } from "../../../../main/typescript/gateway/plugin-satp-gateway"; import { GoIpfsTestContainer } from "@hyperledger/cactus-test-tooling"; import { @@ -22,8 +22,8 @@ import { } from "../../../../main/typescript/public-api"; import { randomInt } from "crypto"; import { checkValidRecoverSuccessMessage } from "../../../../main/typescript/gateway/recovery/recover-success"; -import { BesuOdapGateway } from "../../../../main/typescript/gateway/besu-odap-gateway"; -import { FabricOdapGateway } from "../../../../main/typescript/gateway/fabric-odap-gateway"; +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"; @@ -31,8 +31,8 @@ import { knexClientConnection, knexServerConnection } from "../../knex.config"; const logLevel: LogLevelDesc = "TRACE"; -let pluginSourceGateway: PluginOdapGateway; -let pluginRecipientGateway: PluginOdapGateway; +let pluginSourceGateway: PluginSatpGateway; +let pluginRecipientGateway: PluginSatpGateway; let sessionID: string; let sessionData: SessionData; @@ -89,7 +89,7 @@ beforeAll(async () => { beforeEach(async () => { const sourceGatewayConstructor = { - name: "plugin-odap-gateway#sourceGateway", + name: "plugin-satp-gateway#sourceGateway", dltIDs: ["DLT2"], instanceId: uuidV4(), ipfsPath: ipfsApiHost, @@ -98,7 +98,7 @@ beforeEach(async () => { knexConfig: knexClientConnection, }; const recipientGatewayConstructor = { - name: "plugin-odap-gateway#recipientGateway", + name: "plugin-satp-gateway#recipientGateway", dltIDs: ["DLT1"], instanceId: uuidV4(), ipfsPath: ipfsApiHost, @@ -107,8 +107,8 @@ beforeEach(async () => { knexConfig: knexServerConnection, }; - pluginSourceGateway = new FabricOdapGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuOdapGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); if ( pluginSourceGateway.database == undefined || @@ -142,7 +142,7 @@ test("valid recover success message from client", async () => { success: true, }; - recoverSuccessMessage.signature = PluginOdapGateway.bufArray2HexStr( + recoverSuccessMessage.signature = PluginSatpGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(recoverSuccessMessage)), ); @@ -159,7 +159,7 @@ test("valid recover success message from server", async () => { success: true, }; - recoverSuccessMessage.signature = PluginOdapGateway.bufArray2HexStr( + recoverSuccessMessage.signature = PluginSatpGateway.bufArray2HexStr( pluginRecipientGateway.sign(JSON.stringify(recoverSuccessMessage)), ); diff --git a/packages/cactus-plugin-odap-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 similarity index 87% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update-ack.test.ts index 3325fbaaa1..e1fefca63d 100644 --- a/packages/cactus-plugin-odap-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 @@ -13,7 +13,7 @@ import { } from "@hyperledger/cactus-common"; import { v4 as uuidV4 } from "uuid"; import { Configuration } from "@hyperledger/cactus-core-api"; -import { PluginOdapGateway } from "../../../../main/typescript/gateway/plugin-odap-gateway"; +import { PluginSatpGateway } from "../../../../main/typescript/gateway/plugin-satp-gateway"; import { GoIpfsTestContainer } from "@hyperledger/cactus-test-tooling"; import { @@ -22,8 +22,8 @@ import { } from "../../../../main/typescript/public-api"; import { randomInt } from "crypto"; import { checkValidRecoverUpdateAckMessage } from "../../../../main/typescript/gateway/recovery/recover-update-ack"; -import { BesuOdapGateway } from "../../../../main/typescript/gateway/besu-odap-gateway"; -import { FabricOdapGateway } from "../../../../main/typescript/gateway/fabric-odap-gateway"; +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"; @@ -31,8 +31,8 @@ import { knexClientConnection, knexServerConnection } from "../../knex.config"; const logLevel: LogLevelDesc = "TRACE"; -let pluginSourceGateway: PluginOdapGateway; -let pluginRecipientGateway: PluginOdapGateway; +let pluginSourceGateway: PluginSatpGateway; +let pluginRecipientGateway: PluginSatpGateway; let sessionID: string; let sessionData: SessionData; @@ -89,7 +89,7 @@ beforeAll(async () => { beforeEach(async () => { const sourceGatewayConstructor = { - name: "plugin-odap-gateway#sourceGateway", + name: "plugin-satp-gateway#sourceGateway", dltIDs: ["DLT2"], instanceId: uuidV4(), ipfsPath: ipfsApiHost, @@ -98,7 +98,7 @@ beforeEach(async () => { knexConfig: knexClientConnection, }; const recipientGatewayConstructor = { - name: "plugin-odap-gateway#recipientGateway", + name: "plugin-satp-gateway#recipientGateway", dltIDs: ["DLT1"], instanceId: uuidV4(), clientHelper: new ClientGatewayHelper(), @@ -106,8 +106,8 @@ beforeEach(async () => { knexConfig: knexServerConnection, }; - pluginSourceGateway = new FabricOdapGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuOdapGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); if ( pluginSourceGateway.database == undefined || @@ -142,7 +142,7 @@ test("valid recover update ack message from client", async () => { changedEntriesHash: [], }; - recoverUpdateAckMessage.signature = PluginOdapGateway.bufArray2HexStr( + recoverUpdateAckMessage.signature = PluginSatpGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(recoverUpdateAckMessage)), ); @@ -160,7 +160,7 @@ test("valid recover update ack message from server", async () => { changedEntriesHash: [], }; - recoverUpdateAckMessage.signature = PluginOdapGateway.bufArray2HexStr( + recoverUpdateAckMessage.signature = PluginSatpGateway.bufArray2HexStr( pluginRecipientGateway.sign(JSON.stringify(recoverUpdateAckMessage)), ); diff --git a/packages/cactus-plugin-odap-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 similarity index 87% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover-update.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover-update.test.ts index 824b35e4c6..cd7447079c 100644 --- a/packages/cactus-plugin-odap-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 @@ -14,11 +14,11 @@ import { } from "@hyperledger/cactus-common"; import { v4 as uuidV4 } from "uuid"; import { Configuration } from "@hyperledger/cactus-core-api"; -import { PluginOdapGateway } from "../../../../main/typescript/gateway/plugin-odap-gateway"; +import { PluginSatpGateway } from "../../../../main/typescript/gateway/plugin-satp-gateway"; import { GoIpfsTestContainer } from "@hyperledger/cactus-test-tooling"; import { - OdapLocalLog, + LocalLog, RecoverUpdateV1Message, RecoverV1Message, SessionData, @@ -30,8 +30,8 @@ import { } from "../../../../main/typescript/gateway/recovery/recover-update"; import { checkValidRecoverMessage } from "../../../../main/typescript/gateway/recovery/recover"; -import { BesuOdapGateway } from "../../../../main/typescript/gateway/besu-odap-gateway"; -import { FabricOdapGateway } from "../../../../main/typescript/gateway/fabric-odap-gateway"; +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"; @@ -42,8 +42,8 @@ const logLevel: LogLevelDesc = "TRACE"; const MAX_RETRIES = 5; const MAX_TIMEOUT = 5000; -let pluginSourceGateway: PluginOdapGateway; -let pluginRecipientGateway: PluginOdapGateway; +let pluginSourceGateway: PluginSatpGateway; +let pluginRecipientGateway: PluginSatpGateway; let sessionID: string; let sessionData: SessionData; @@ -100,7 +100,7 @@ beforeAll(async () => { beforeEach(async () => { const sourceGatewayConstructor = { - name: "plugin-odap-gateway#sourceGateway", + name: "plugin-satp-gateway#sourceGateway", dltIDs: ["DLT2"], instanceId: uuidV4(), ipfsPath: ipfsApiHost, @@ -110,7 +110,7 @@ beforeEach(async () => { knexConfig: knexClientConnection, }; const recipientGatewayConstructor = { - name: "plugin-odap-gateway#recipientGateway", + name: "plugin-satp-gateway#recipientGateway", dltIDs: ["DLT1"], instanceId: uuidV4(), ipfsPath: ipfsApiHost, @@ -120,8 +120,8 @@ beforeEach(async () => { knexConfig: knexServerConnection, }; - pluginSourceGateway = new FabricOdapGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuOdapGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); if ( pluginSourceGateway.database == undefined || @@ -160,7 +160,7 @@ test("valid recover update message from server", async () => { signature: "", }; - recoverUpdateMessage.signature = PluginOdapGateway.bufArray2HexStr( + recoverUpdateMessage.signature = PluginSatpGateway.bufArray2HexStr( pluginRecipientGateway.sign(JSON.stringify(recoverUpdateMessage)), ); @@ -199,7 +199,7 @@ test("check valid built of recover update message", async () => { pluginRecipientGateway.sessions.set(sessionID, sessionData2); - const odapLog1: OdapLocalLog = { + const odapLog1: LocalLog = { sessionID: sessionID, type: "init", operation: "validate", @@ -209,34 +209,34 @@ test("check valid built of recover update message", async () => { const firstTimestamp = Date.now().toString(); await new Promise((resolve) => setTimeout(resolve, 5000)); - await pluginSourceGateway.storeOdapLog(odapLog1); + await pluginSourceGateway.storeLog(odapLog1); - const odapLog2: OdapLocalLog = { + const odapLog2: LocalLog = { sessionID: sessionID, type: "exec", operation: "validate", data: JSON.stringify(sessionData), }; - await pluginRecipientGateway.storeOdapLog(odapLog2); + await pluginRecipientGateway.storeLog(odapLog2); - const odapLog3: OdapLocalLog = { + const odapLog3: LocalLog = { sessionID: sessionID, type: "done", operation: "validate", data: JSON.stringify(sessionData), }; - await pluginRecipientGateway.storeOdapLog(odapLog3); + await pluginRecipientGateway.storeLog(odapLog3); - const odapLog4: OdapLocalLog = { + const odapLog4: LocalLog = { sessionID: sessionID, type: "ack", operation: "validate", data: JSON.stringify(sessionData), }; - await pluginRecipientGateway.storeOdapLog(odapLog4); + await pluginRecipientGateway.storeLog(odapLog4); const recoverMessage: RecoverV1Message = { sessionID: sessionID, @@ -248,7 +248,7 @@ test("check valid built of recover update message", async () => { newBasePath: "", }; - recoverMessage.signature = PluginOdapGateway.bufArray2HexStr( + recoverMessage.signature = PluginSatpGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(recoverMessage)), ); diff --git a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover.test.ts b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover.test.ts similarity index 86% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover.test.ts index 16fcbf3e6f..d87df27892 100644 --- a/packages/cactus-plugin-odap-hermes/src/test/typescript/unit/recovery/recover.test.ts +++ b/packages/cactus-plugin-satp-hermes/src/test/typescript/unit/recovery/recover.test.ts @@ -15,17 +15,17 @@ import { import { v4 as uuidV4 } from "uuid"; import { Configuration } from "@hyperledger/cactus-core-api"; import { - IPluginOdapGatewayConstructorOptions, - PluginOdapGateway, -} from "../../../../main/typescript/gateway/plugin-odap-gateway"; + IPluginSatpGatewayConstructorOptions, + PluginSatpGateway, +} from "../../../../main/typescript/gateway/plugin-satp-gateway"; import { GoIpfsTestContainer } from "@hyperledger/cactus-test-tooling"; import { RecoverV1Message } from "../../../../main/typescript/public-api"; import { randomInt } from "crypto"; import { checkValidRecoverMessage } from "../../../../main/typescript/gateway/recovery/recover"; -import { BesuOdapGateway } from "../../../../main/typescript/gateway/besu-odap-gateway"; -import { FabricOdapGateway } from "../../../../main/typescript/gateway/fabric-odap-gateway"; +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"; @@ -33,11 +33,11 @@ import { knexClientConnection, knexServerConnection } from "../../knex.config"; const logLevel: LogLevelDesc = "TRACE"; -let sourceGatewayConstructor: IPluginOdapGatewayConstructorOptions; -let recipientGatewayConstructor: IPluginOdapGatewayConstructorOptions; +let sourceGatewayConstructor: IPluginSatpGatewayConstructorOptions; +let recipientGatewayConstructor: IPluginSatpGatewayConstructorOptions; -let pluginSourceGateway: PluginOdapGateway; -let pluginRecipientGateway: PluginOdapGateway; +let pluginSourceGateway: PluginSatpGateway; +let pluginRecipientGateway: PluginSatpGateway; let sessionID: string; let ipfsContainer: GoIpfsTestContainer; @@ -90,7 +90,7 @@ beforeAll(async () => { await pluginIpfs.registerWebServices(expressApp); sourceGatewayConstructor = { - name: "plugin-odap-gateway#sourceGateway", + name: "plugin-satp-gateway#sourceGateway", dltIDs: ["DLT2"], instanceId: uuidV4(), ipfsPath: ipfsApiHost, @@ -100,7 +100,7 @@ beforeAll(async () => { knexConfig: knexClientConnection, }; recipientGatewayConstructor = { - name: "plugin-odap-gateway#recipientGateway", + name: "plugin-satp-gateway#recipientGateway", dltIDs: ["DLT1"], instanceId: uuidV4(), ipfsPath: ipfsApiHost, @@ -115,8 +115,8 @@ beforeEach(async () => { sessionID = uuidv4(); sequenceNumber = randomInt(100); - pluginSourceGateway = new FabricOdapGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuOdapGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); const sessionData = { lastSequenceNumber: sequenceNumber, @@ -163,7 +163,7 @@ test("valid recover message request from client", async () => { newBasePath: "", }; - recoverMessage.signature = PluginOdapGateway.bufArray2HexStr( + recoverMessage.signature = PluginSatpGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(recoverMessage)), ); @@ -181,7 +181,7 @@ test("valid recover message request from server", async () => { newBasePath: "", }; - recoverMessage.signature = PluginOdapGateway.bufArray2HexStr( + recoverMessage.signature = PluginSatpGateway.bufArray2HexStr( pluginRecipientGateway.sign(JSON.stringify(recoverMessage)), ); @@ -203,7 +203,7 @@ test("recover message request from client with wrong signature", async () => { newBasePath: "", }; - recoverMessage.signature = PluginOdapGateway.bufArray2HexStr( + recoverMessage.signature = PluginSatpGateway.bufArray2HexStr( pluginRecipientGateway.sign(JSON.stringify("wrongRecoverMessage")), ); diff --git a/packages/cactus-plugin-odap-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 similarity index 90% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/unit/server/commit-final.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-final.test.ts index b0cfb6d2ae..106982cffa 100644 --- a/packages/cactus-plugin-odap-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 @@ -4,10 +4,10 @@ import bodyParser from "body-parser"; import http, { Server } from "http"; import { SHA256 } from "crypto-js"; import { - IPluginOdapGatewayConstructorOptions, + IPluginSatpGatewayConstructorOptions, OdapMessageType, - PluginOdapGateway, -} from "../../../../main/typescript/gateway/plugin-odap-gateway"; + PluginSatpGateway, +} from "../../../../main/typescript/gateway/plugin-satp-gateway"; import { DefaultApi as ObjectStoreIpfsApi } from "@hyperledger/cactus-plugin-object-store-ipfs"; import { CommitFinalV1Request, @@ -25,8 +25,8 @@ import { GoIpfsTestContainer } from "@hyperledger/cactus-test-tooling"; import express from "express"; import { AddressInfo } from "net"; -import { BesuOdapGateway } from "../../../../main/typescript/gateway/besu-odap-gateway"; -import { FabricOdapGateway } from "../../../../main/typescript/gateway/fabric-odap-gateway"; +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"; @@ -37,10 +37,10 @@ const logLevel: LogLevelDesc = "TRACE"; const COMMIT_FINAL_CLAIM = "dummyCommitFinalClaim"; -let sourceGatewayConstructor: IPluginOdapGatewayConstructorOptions; -let recipientGatewayConstructor: IPluginOdapGatewayConstructorOptions; -let pluginSourceGateway: PluginOdapGateway; -let pluginRecipientGateway: PluginOdapGateway; +let sourceGatewayConstructor: IPluginSatpGatewayConstructorOptions; +let recipientGatewayConstructor: IPluginSatpGatewayConstructorOptions; +let pluginSourceGateway: PluginSatpGateway; +let pluginRecipientGateway: PluginSatpGateway; let dummyCommitPreparationResponseMessageHash: string; let sessionData: SessionData; let sessionID: string; @@ -96,7 +96,7 @@ beforeAll(async () => { beforeEach(async () => { sourceGatewayConstructor = { - name: "plugin-odap-gateway#sourceGateway", + name: "plugin-satp-gateway#sourceGateway", dltIDs: ["DLT2"], instanceId: uuidv4(), ipfsPath: ipfsApiHost, @@ -105,7 +105,7 @@ beforeEach(async () => { }; recipientGatewayConstructor = { - name: "plugin-odap-gateway#recipientGateway", + name: "plugin-satp-gateway#recipientGateway", dltIDs: ["DLT1"], instanceId: uuidv4(), ipfsPath: ipfsApiHost, @@ -113,8 +113,8 @@ beforeEach(async () => { serverHelper: new ServerGatewayHelper(), }; - pluginSourceGateway = new FabricOdapGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuOdapGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); if ( pluginSourceGateway.database == undefined || @@ -153,7 +153,7 @@ beforeEach(async () => { pluginSourceGateway.sessions.set(sessionID, sessionData); pluginRecipientGateway.sessions.set(sessionID, sessionData); - await pluginSourceGateway.storeOdapProof({ + await pluginSourceGateway.storeProof({ sessionID: sessionID, type: "proof", operation: "delete", @@ -190,7 +190,7 @@ test("valid commit final request", async () => { sequenceNumber: sequenceNumber + 1, }; - commitFinalRequestMessage.signature = PluginOdapGateway.bufArray2HexStr( + commitFinalRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(commitFinalRequestMessage)), ); @@ -230,7 +230,7 @@ test("commit final request with wrong sessionId", async () => { sequenceNumber: sequenceNumber + 1, }; - commitFinalRequestMessage.signature = PluginOdapGateway.bufArray2HexStr( + commitFinalRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(commitFinalRequestMessage)), ); @@ -261,7 +261,7 @@ test("commit final request with wrong message type", async () => { sequenceNumber: sequenceNumber + 1, }; - commitFinalRequestMessage.signature = PluginOdapGateway.bufArray2HexStr( + commitFinalRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(commitFinalRequestMessage)), ); @@ -290,7 +290,7 @@ test("commit final request with wrong previous message hash", async () => { sequenceNumber: sequenceNumber + 1, }; - commitFinalRequestMessage.signature = PluginOdapGateway.bufArray2HexStr( + commitFinalRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(commitFinalRequestMessage)), ); diff --git a/packages/cactus-plugin-odap-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 similarity index 87% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/unit/server/commit-preparation.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/commit-preparation.test.ts index 5beb66467f..caa67c3b22 100644 --- a/packages/cactus-plugin-odap-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 @@ -1,27 +1,27 @@ import { randomInt } from "crypto"; import { - IPluginOdapGatewayConstructorOptions, + IPluginSatpGatewayConstructorOptions, OdapMessageType, - PluginOdapGateway, -} from "../../../../main/typescript/gateway/plugin-odap-gateway"; + 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 { BesuOdapGateway } from "../../../../main/typescript/gateway/besu-odap-gateway"; -import { FabricOdapGateway } from "../../../../main/typescript/gateway/fabric-odap-gateway"; +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 sourceGatewayConstructor: IPluginOdapGatewayConstructorOptions; -let recipientGatewayConstructor: IPluginOdapGatewayConstructorOptions; -let pluginSourceGateway: PluginOdapGateway; -let pluginRecipientGateway: PluginOdapGateway; +let sourceGatewayConstructor: IPluginSatpGatewayConstructorOptions; +let recipientGatewayConstructor: IPluginSatpGatewayConstructorOptions; +let pluginSourceGateway: PluginSatpGateway; +let pluginRecipientGateway: PluginSatpGateway; let dummyLockEvidenceResponseMessageHash: string; let sessionData: SessionData; let sessionID: string; @@ -29,22 +29,22 @@ let sequenceNumber: number; beforeEach(async () => { sourceGatewayConstructor = { - name: "plugin-odap-gateway#sourceGateway", + name: "plugin-satp-gateway#sourceGateway", dltIDs: ["DLT2"], instanceId: uuidV4(), clientHelper: new ClientGatewayHelper(), serverHelper: new ServerGatewayHelper(), }; recipientGatewayConstructor = { - name: "plugin-odap-gateway#recipientGateway", + name: "plugin-satp-gateway#recipientGateway", dltIDs: ["DLT1"], instanceId: uuidV4(), clientHelper: new ClientGatewayHelper(), serverHelper: new ServerGatewayHelper(), }; - pluginSourceGateway = new FabricOdapGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuOdapGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); if ( pluginSourceGateway.database == undefined || @@ -95,7 +95,7 @@ test("valid commit prepare request", async () => { sequenceNumber: sequenceNumber + 1, }; - commitPrepareRequestMessage.signature = PluginOdapGateway.bufArray2HexStr( + commitPrepareRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(commitPrepareRequestMessage)), ); @@ -132,7 +132,7 @@ test("commit prepare request with wrong sessionId", async () => { sequenceNumber: sequenceNumber + 1, }; - commitPrepareRequestMessage.signature = PluginOdapGateway.bufArray2HexStr( + commitPrepareRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(commitPrepareRequestMessage)), ); @@ -162,7 +162,7 @@ test("commit prepare request with wrong message type", async () => { sequenceNumber: sequenceNumber + 1, }; - commitPrepareRequestMessage.signature = PluginOdapGateway.bufArray2HexStr( + commitPrepareRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(commitPrepareRequestMessage)), ); @@ -192,7 +192,7 @@ test("commit prepare request with wrong previous message hash", async () => { sequenceNumber: sequenceNumber + 1, }; - commitPrepareRequestMessage.signature = PluginOdapGateway.bufArray2HexStr( + commitPrepareRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(commitPrepareRequestMessage)), ); diff --git a/packages/cactus-plugin-odap-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 similarity index 91% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/unit/server/lock-evidence.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/lock-evidence.test.ts index d68d2b5811..e88198bab1 100644 --- a/packages/cactus-plugin-odap-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 @@ -3,10 +3,10 @@ import { v4 as uuidv4 } from "uuid"; import bodyParser from "body-parser"; import http, { Server } from "http"; import { - IPluginOdapGatewayConstructorOptions, + IPluginSatpGatewayConstructorOptions, OdapMessageType, - PluginOdapGateway, -} from "../../../../main/typescript/gateway/plugin-odap-gateway"; + PluginSatpGateway, +} from "../../../../main/typescript/gateway/plugin-satp-gateway"; import { LockEvidenceV1Request, SessionData, @@ -26,8 +26,8 @@ import { GoIpfsTestContainer } from "@hyperledger/cactus-test-tooling"; import express from "express"; import { AddressInfo } from "net"; -import { BesuOdapGateway } from "../../../../main/typescript/gateway/besu-odap-gateway"; -import { FabricOdapGateway } from "../../../../main/typescript/gateway/fabric-odap-gateway"; +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"; @@ -38,10 +38,10 @@ const logLevel: LogLevelDesc = "TRACE"; const LOCK_EVIDENCE_CLAIM = "dummyLockEvidenceClaim"; -let sourceGatewayConstructor: IPluginOdapGatewayConstructorOptions; -let recipientGatewayConstructor: IPluginOdapGatewayConstructorOptions; -let pluginSourceGateway: PluginOdapGateway; -let pluginRecipientGateway: PluginOdapGateway; +let sourceGatewayConstructor: IPluginSatpGatewayConstructorOptions; +let recipientGatewayConstructor: IPluginSatpGatewayConstructorOptions; +let pluginSourceGateway: PluginSatpGateway; +let pluginRecipientGateway: PluginSatpGateway; let dummyTransferCommenceResponseMessageHash: string; let sessionData: SessionData; let lockExpiryDate: string; @@ -98,7 +98,7 @@ beforeAll(async () => { beforeEach(async () => { sourceGatewayConstructor = { - name: "plugin-odap-gateway#sourceGateway", + name: "plugin-satp-gateway#sourceGateway", dltIDs: ["DLT2"], instanceId: uuidV4(), ipfsPath: ipfsApiHost, @@ -106,7 +106,7 @@ beforeEach(async () => { serverHelper: new ServerGatewayHelper(), }; recipientGatewayConstructor = { - name: "plugin-odap-gateway#recipientGateway", + name: "plugin-satp-gateway#recipientGateway", dltIDs: ["DLT1"], instanceId: uuidV4(), ipfsPath: ipfsApiHost, @@ -114,8 +114,8 @@ beforeEach(async () => { serverHelper: new ServerGatewayHelper(), }; - pluginSourceGateway = new FabricOdapGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuOdapGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); if ( pluginSourceGateway.database == undefined || @@ -157,7 +157,7 @@ beforeEach(async () => { pluginSourceGateway.sessions.set(sessionID, sessionData); pluginRecipientGateway.sessions.set(sessionID, sessionData); - await pluginSourceGateway.storeOdapProof({ + await pluginSourceGateway.storeProof({ sessionID: sessionID, type: "proof", operation: "lock", @@ -195,7 +195,7 @@ test("valid lock evidence request", async () => { sequenceNumber: sequenceNumber + 1, }; - lockEvidenceRequestMessage.signature = PluginOdapGateway.bufArray2HexStr( + lockEvidenceRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(lockEvidenceRequestMessage)), ); @@ -235,7 +235,7 @@ test("lock evidence request with wrong sessionId", async () => { sequenceNumber: sequenceNumber + 1, }; - lockEvidenceRequestMessage.signature = PluginOdapGateway.bufArray2HexStr( + lockEvidenceRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(lockEvidenceRequestMessage)), ); @@ -267,7 +267,7 @@ test("lock evidence request with wrong message type", async () => { sequenceNumber: sequenceNumber + 1, }; - lockEvidenceRequestMessage.signature = PluginOdapGateway.bufArray2HexStr( + lockEvidenceRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(lockEvidenceRequestMessage)), ); @@ -297,7 +297,7 @@ test("lock evidence request with wrong previous message hash", async () => { sequenceNumber: sequenceNumber + 1, }; - lockEvidenceRequestMessage.signature = PluginOdapGateway.bufArray2HexStr( + lockEvidenceRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(lockEvidenceRequestMessage)), ); @@ -327,7 +327,7 @@ test("transfer commence flow with invalid claim", async () => { sequenceNumber: sequenceNumber + 1, }; - lockEvidenceRequestMessage.signature = PluginOdapGateway.bufArray2HexStr( + lockEvidenceRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(lockEvidenceRequestMessage)), ); diff --git a/packages/cactus-plugin-odap-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 similarity index 90% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/unit/server/transfer-commence.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-commence.test.ts index ed935a9971..3a47e34629 100644 --- a/packages/cactus-plugin-odap-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 @@ -1,9 +1,9 @@ import { randomInt } from "crypto"; import { - IPluginOdapGatewayConstructorOptions, + IPluginSatpGatewayConstructorOptions, OdapMessageType, - PluginOdapGateway, -} from "../../../../main/typescript/gateway/plugin-odap-gateway"; + PluginSatpGateway, +} from "../../../../main/typescript/gateway/plugin-satp-gateway"; import { TransferCommenceV1Request, AssetProfile, @@ -11,18 +11,18 @@ import { } from "../../../../main/typescript/generated/openapi/typescript-axios/api"; import { v4 as uuidV4 } from "uuid"; import { SHA256 } from "crypto-js"; -import { FabricOdapGateway } from "../../../../main/typescript/gateway/fabric-odap-gateway"; -import { BesuOdapGateway } from "../../../../main/typescript/gateway/besu-odap-gateway"; +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 sourceGatewayConstructor: IPluginOdapGatewayConstructorOptions; -let recipientGatewayConstructor: IPluginOdapGatewayConstructorOptions; -let pluginSourceGateway: PluginOdapGateway; -let pluginRecipientGateway: PluginOdapGateway; +let sourceGatewayConstructor: IPluginSatpGatewayConstructorOptions; +let recipientGatewayConstructor: IPluginSatpGatewayConstructorOptions; +let pluginSourceGateway: PluginSatpGateway; +let pluginRecipientGateway: PluginSatpGateway; let dummyInitializationResponseMessageHash: string; let expiryDate: string; let assetProfile: AssetProfile; @@ -33,22 +33,22 @@ let sequenceNumber: number; beforeEach(async () => { sourceGatewayConstructor = { - name: "plugin-odap-gateway#sourceGateway", + name: "plugin-satp-gateway#sourceGateway", dltIDs: ["DLT2"], instanceId: uuidV4(), clientHelper: new ClientGatewayHelper(), serverHelper: new ServerGatewayHelper(), }; recipientGatewayConstructor = { - name: "plugin-odap-gateway#recipientGateway", + name: "plugin-satp-gateway#recipientGateway", dltIDs: ["DLT1"], instanceId: uuidV4(), clientHelper: new ClientGatewayHelper(), serverHelper: new ServerGatewayHelper(), }; - pluginSourceGateway = new FabricOdapGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuOdapGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); if ( pluginSourceGateway.database == undefined || @@ -114,7 +114,7 @@ test("valid transfer commence request", async () => { sequenceNumber: sequenceNumber + 1, }; - transferCommenceRequest.signature = PluginOdapGateway.bufArray2HexStr( + transferCommenceRequest.signature = PluginSatpGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(transferCommenceRequest)), ); @@ -159,7 +159,7 @@ test("transfer commence request with wrong sessionId", async () => { sequenceNumber: sequenceNumber + 1, }; - transferCommenceRequest.signature = PluginOdapGateway.bufArray2HexStr( + transferCommenceRequest.signature = PluginSatpGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(transferCommenceRequest)), ); @@ -194,7 +194,7 @@ test("transfer commence request with wrong message type", async () => { sequenceNumber: sequenceNumber + 1, }; - transferCommenceRequest.signature = PluginOdapGateway.bufArray2HexStr( + transferCommenceRequest.signature = PluginSatpGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(transferCommenceRequest)), ); @@ -229,7 +229,7 @@ test("transfer commence request with wrong signature", async () => { sequenceNumber: sequenceNumber + 1, }; - transferCommenceRequest.signature = PluginOdapGateway.bufArray2HexStr( + transferCommenceRequest.signature = PluginSatpGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify("wrongData")), ); @@ -264,7 +264,7 @@ test("transfer commence request with wrong previous message hash", async () => { sequenceNumber: sequenceNumber + 1, }; - transferCommenceRequest.signature = PluginOdapGateway.bufArray2HexStr( + transferCommenceRequest.signature = PluginSatpGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(transferCommenceRequest)), ); @@ -299,7 +299,7 @@ test("transfer commence request with wrong asset profile hash", async () => { sequenceNumber: sequenceNumber + 1, }; - transferCommenceRequest.signature = PluginOdapGateway.bufArray2HexStr( + transferCommenceRequest.signature = PluginSatpGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(transferCommenceRequest)), ); diff --git a/packages/cactus-plugin-odap-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 similarity index 80% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/unit/server/transfer-complete.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-complete.test.ts index d9bf19bcba..cada10e280 100644 --- a/packages/cactus-plugin-odap-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 @@ -1,8 +1,8 @@ import { - IPluginOdapGatewayConstructorOptions, + IPluginSatpGatewayConstructorOptions, OdapMessageType, - PluginOdapGateway, -} from "../../../../main/typescript/gateway/plugin-odap-gateway"; + PluginSatpGateway, +} from "../../../../main/typescript/gateway/plugin-satp-gateway"; import { SessionData, TransferCompleteV1Request, @@ -10,15 +10,15 @@ import { import { v4 as uuidV4 } from "uuid"; import { SHA256 } from "crypto-js"; import { randomInt } from "crypto"; -import { BesuOdapGateway } from "../../../../main/typescript/gateway/besu-odap-gateway"; -import { FabricOdapGateway } from "../../../../main/typescript/gateway/fabric-odap-gateway"; +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"; -let sourceGatewayConstructor: IPluginOdapGatewayConstructorOptions; -let recipientGatewayConstructor: IPluginOdapGatewayConstructorOptions; -let pluginSourceGateway: PluginOdapGateway; -let pluginRecipientGateway: PluginOdapGateway; +let sourceGatewayConstructor: IPluginSatpGatewayConstructorOptions; +let recipientGatewayConstructor: IPluginSatpGatewayConstructorOptions; +let pluginSourceGateway: PluginSatpGateway; +let pluginRecipientGateway: PluginSatpGateway; let dummyCommitFinalResponseMessageHash: string; let dummyTransferCommenceResponseMessageHash: string; let sessionData: SessionData; @@ -27,22 +27,22 @@ let sequenceNumber: number; beforeEach(async () => { sourceGatewayConstructor = { - name: "plugin-odap-gateway#sourceGateway", + name: "plugin-satp-gateway#sourceGateway", dltIDs: ["DLT2"], instanceId: uuidV4(), clientHelper: new ClientGatewayHelper(), serverHelper: new ServerGatewayHelper(), }; recipientGatewayConstructor = { - name: "plugin-odap-gateway#recipientGateway", + name: "plugin-satp-gateway#recipientGateway", dltIDs: ["DLT1"], instanceId: uuidV4(), clientHelper: new ClientGatewayHelper(), serverHelper: new ServerGatewayHelper(), }; - pluginSourceGateway = new FabricOdapGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuOdapGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); if ( pluginSourceGateway.database == undefined || @@ -100,7 +100,7 @@ test("dummy test for transfer complete flow", async () => { sequenceNumber: sequenceNumber + 1, }; - transferCompleteRequestMessage.signature = PluginOdapGateway.bufArray2HexStr( + transferCompleteRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(transferCompleteRequestMessage)), ); diff --git a/packages/cactus-plugin-odap-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 similarity index 91% rename from packages/cactus-plugin-odap-hermes/src/test/typescript/unit/server/transfer-initialization.test.ts rename to packages/cactus-plugin-satp-hermes/src/test/typescript/unit/server/transfer-initialization.test.ts index 88248a25b9..1dc1f229ac 100644 --- a/packages/cactus-plugin-odap-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 @@ -3,15 +3,15 @@ import { SHA256 } from "crypto-js"; import { v4 as uuidV4 } from "uuid"; import { OdapMessageType, - PluginOdapGateway, -} from "../../../../main/typescript/gateway/plugin-odap-gateway"; + PluginSatpGateway, +} from "../../../../main/typescript/gateway/plugin-satp-gateway"; import { TransferInitializationV1Request, AssetProfile, SessionData, } from "../../../../main/typescript/public-api"; -import { BesuOdapGateway } from "../../../../main/typescript/gateway/besu-odap-gateway"; -import { FabricOdapGateway } from "../../../../main/typescript/gateway/fabric-odap-gateway"; +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"; @@ -20,8 +20,8 @@ const MAX_TIMEOUT = 5000; let sourceGatewayConstructor; let recipientGatewayConstructor; -let pluginSourceGateway: PluginOdapGateway; -let pluginRecipientGateway: PluginOdapGateway; +let pluginSourceGateway: PluginSatpGateway; +let pluginRecipientGateway: PluginSatpGateway; let expiryDate: string; let assetProfile: AssetProfile; let sequenceNumber: number; @@ -29,22 +29,22 @@ let sessionID: string; beforeEach(async () => { sourceGatewayConstructor = { - name: "plugin-odap-gateway#sourceGateway", + name: "plugin-satp-gateway#sourceGateway", dltIDs: ["DLT2"], instanceId: uuidV4(), clientHelper: new ClientGatewayHelper(), serverHelper: new ServerGatewayHelper(), }; recipientGatewayConstructor = { - name: "plugin-odap-gateway#recipientGateway", + name: "plugin-satp-gateway#recipientGateway", dltIDs: ["DLT1"], instanceId: uuidV4(), clientHelper: new ClientGatewayHelper(), serverHelper: new ServerGatewayHelper(), }; - pluginSourceGateway = new FabricOdapGateway(sourceGatewayConstructor); - pluginRecipientGateway = new BesuOdapGateway(recipientGatewayConstructor); + pluginSourceGateway = new FabricSatpGateway(sourceGatewayConstructor); + pluginRecipientGateway = new BesuSatpGateway(recipientGatewayConstructor); if ( pluginSourceGateway.database == undefined || @@ -92,7 +92,7 @@ test("valid transfer initiation request", async () => { sourceLedgerAssetID: "", }; - initializationRequestMessage.signature = PluginOdapGateway.bufArray2HexStr( + initializationRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( await pluginSourceGateway.sign( JSON.stringify(initializationRequestMessage), ), @@ -160,7 +160,7 @@ test("transfer initiation request invalid because of incompatible DLTs", async ( sourceLedgerAssetID: "", }; - initializationRequestMessage.signature = PluginOdapGateway.bufArray2HexStr( + initializationRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( await pluginSourceGateway.sign( JSON.stringify(initializationRequestMessage), ), @@ -211,7 +211,7 @@ test("transfer initiation request invalid because of asset expired", async () => sourceLedgerAssetID: "", }; - initializationRequestMessage.signature = PluginOdapGateway.bufArray2HexStr( + initializationRequestMessage.signature = PluginSatpGateway.bufArray2HexStr( pluginSourceGateway.sign(JSON.stringify(initializationRequestMessage)), ); diff --git a/packages/cactus-plugin-odap-hermes/tsconfig.json b/packages/cactus-plugin-satp-hermes/tsconfig.json similarity index 93% rename from packages/cactus-plugin-odap-hermes/tsconfig.json rename to packages/cactus-plugin-satp-hermes/tsconfig.json index d657577343..9246809a97 100644 --- a/packages/cactus-plugin-odap-hermes/tsconfig.json +++ b/packages/cactus-plugin-satp-hermes/tsconfig.json @@ -8,7 +8,7 @@ "allowJs": false, "skipLibCheck": true, "rootDir": "./src/", - "tsBuildInfoFile": "../../.build-cache/cactus-plugin-odap-hermes.tsbuildinfo", + "tsBuildInfoFile": "../../.build-cache/cactus-plugin-satp-hermes.tsbuildinfo", "moduleResolution": "Node16" }, "ts-node": { diff --git a/tsconfig.json b/tsconfig.json index f33c9d1570..9239b9d4fb 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -146,7 +146,7 @@ "path": "./examples/cactus-example-tcs-huawei/tsconfig.json" }, { - "path": "./packages/cactus-plugin-odap-hermes/tsconfig.json" + "path": "./packages/cactus-plugin-satp-hermes/tsconfig.json" }, { "path": "./examples/cactus-example-electricity-trade/tsconfig.json" diff --git a/yarn.lock b/yarn.lock index 175790c8fe..2c87ab4861 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7501,7 +7501,7 @@ __metadata: "@hyperledger/cactus-plugin-ledger-connector-fabric": 2.0.0-alpha.2 "@hyperledger/cactus-plugin-ledger-connector-xdai": 2.0.0-alpha.2 "@hyperledger/cactus-plugin-object-store-ipfs": 2.0.0-alpha.2 - "@hyperledger/cactus-plugin-odap-hermes": 2.0.0-alpha.2 + "@hyperledger/cactus-plugin-satp-hermes": 2.0.0-alpha.2 "@hyperledger/cactus-test-tooling": 2.0.0-alpha.2 "@openzeppelin/contracts": 4.9.3 "@openzeppelin/contracts-upgradeable": 4.9.3 @@ -8509,44 +8509,6 @@ __metadata: languageName: unknown linkType: soft -"@hyperledger/cactus-plugin-odap-hermes@2.0.0-alpha.2, @hyperledger/cactus-plugin-odap-hermes@workspace:packages/cactus-plugin-odap-hermes": - version: 0.0.0-use.local - resolution: "@hyperledger/cactus-plugin-odap-hermes@workspace:packages/cactus-plugin-odap-hermes" - dependencies: - "@hyperledger/cactus-cmd-api-server": 2.0.0-alpha.2 - "@hyperledger/cactus-common": 2.0.0-alpha.2 - "@hyperledger/cactus-core": 2.0.0-alpha.2 - "@hyperledger/cactus-core-api": 2.0.0-alpha.2 - "@hyperledger/cactus-plugin-keychain-memory": 2.0.0-alpha.2 - "@hyperledger/cactus-plugin-ledger-connector-besu": 2.0.0-alpha.2 - "@hyperledger/cactus-plugin-ledger-connector-fabric": 2.0.0-alpha.2 - "@hyperledger/cactus-plugin-object-store-ipfs": 2.0.0-alpha.2 - "@hyperledger/cactus-test-tooling": 2.0.0-alpha.2 - "@types/body-parser": 1.19.4 - "@types/crypto-js": 4.0.1 - "@types/express": 4.17.19 - "@types/fs-extra": 11.0.3 - "@types/tape": 4.13.4 - "@types/uuid": 9.0.6 - axios: 1.6.0 - body-parser: 1.20.2 - crypto-js: 4.2.0 - express: 4.18.2 - fabric-network: 2.2.19 - fs-extra: 11.1.1 - knex: 2.4.0 - kubo-rpc-client: 3.0.1 - secp256k1: 4.0.3 - socket.io: 4.5.4 - sqlite3: 5.1.5 - typescript: 5.3.3 - typescript-optional: 2.0.1 - uuid: 9.0.1 - web3: 1.6.1 - web3-utils: 1.6.1 - 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" @@ -8606,6 +8568,44 @@ __metadata: languageName: unknown linkType: soft +"@hyperledger/cactus-plugin-satp-hermes@2.0.0-alpha.2, @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": 2.0.0-alpha.2 + "@hyperledger/cactus-common": 2.0.0-alpha.2 + "@hyperledger/cactus-core": 2.0.0-alpha.2 + "@hyperledger/cactus-core-api": 2.0.0-alpha.2 + "@hyperledger/cactus-plugin-keychain-memory": 2.0.0-alpha.2 + "@hyperledger/cactus-plugin-ledger-connector-besu": 2.0.0-alpha.2 + "@hyperledger/cactus-plugin-ledger-connector-fabric": 2.0.0-alpha.2 + "@hyperledger/cactus-plugin-object-store-ipfs": 2.0.0-alpha.2 + "@hyperledger/cactus-test-tooling": 2.0.0-alpha.2 + "@types/body-parser": 1.19.4 + "@types/crypto-js": 4.0.1 + "@types/express": 4.17.19 + "@types/fs-extra": 11.0.3 + "@types/tape": 4.13.4 + "@types/uuid": 9.0.6 + axios: 1.6.0 + body-parser: 1.20.2 + crypto-js: 4.2.0 + express: 4.18.2 + fabric-network: 2.2.19 + fs-extra: 11.1.1 + knex: 2.4.0 + kubo-rpc-client: 3.0.1 + secp256k1: 4.0.3 + socket.io: 4.5.4 + sqlite3: 5.1.5 + typescript: 5.3.3 + typescript-optional: 2.0.1 + uuid: 9.0.1 + web3: 1.6.1 + web3-utils: 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"